/* ZeptoQuake — Under Construction placeholder
   Standalone styling. Tectonic "charging up" theme with a unique
   seismic charge meter. Shares only the colour language of the site. */

:root {
  --bg: #070b16;
  --bg-2: #0d1326;
  --blue: #2e8bff;
  --blue-bright: #5fb0ff;
  --orange: #ff7a1a;
  --orange-bright: #ffb347;
  --text: #eaf0fb;
  --text-muted: #9fadc9;
  --text-dim: #6b7895;
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  text-align: center;
}

/* Animated tectonic backdrop */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(700px circle at 18% 20%, rgba(46, 139, 255, 0.22), transparent 60%),
    radial-gradient(700px circle at 82% 80%, rgba(255, 122, 26, 0.2), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}
.bg-layer::after {
  content: "";
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(circle at 30% 40%, rgba(46, 139, 255, 0.12), transparent 25%),
    radial-gradient(circle at 70% 60%, rgba(255, 122, 26, 0.1), transparent 25%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate(-2%, -1%) scale(1); }
  to { transform: translate(2%, 1%) scale(1.08); }
}

/* A faint diagonal fault line that pulses across the screen */
.fault {
  position: fixed;
  top: -10%;
  left: 50%;
  width: 2px;
  height: 120%;
  transform: translateX(-50%) rotate(14deg);
  background: linear-gradient(180deg, transparent, var(--blue-bright), var(--orange-bright), transparent);
  filter: blur(1.5px);
  opacity: 0.35;
  z-index: -1;
  animation: faultPulse 4.5s ease-in-out infinite;
}
@keyframes faultPulse {
  0%, 100% { opacity: 0.18; }
  50% { opacity: 0.5; }
}

.wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  gap: 6px;
}

/* Centerpiece graphic from start/inspirations */
.core {
  position: relative;
  width: clamp(180px, 36vw, 280px);
  height: clamp(180px, 36vw, 280px);
  display: grid;
  place-items: center;
  margin-top: 36px;
  margin-bottom: 44px;
}
.core img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 36px rgba(46, 139, 255, 0.45));
  animation: hover 5s ease-in-out infinite;
  z-index: 2;
}
@keyframes hover {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.03); }
}
/* Two counter-rotating energy rings around the core */
.ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
}
.ring-1 {
  inset: -6%;
  border-top-color: var(--blue-bright);
  border-right-color: rgba(95, 176, 255, 0.3);
  animation: spin 6s linear infinite;
}
.ring-2 {
  inset: 4%;
  border-bottom-color: var(--orange-bright);
  border-left-color: rgba(255, 179, 71, 0.3);
  animation: spin 9s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }

.logo {
  width: min(520px, 88vw);
  margin: 0 auto 10px;
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.5));
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4.5vw, 2.4rem);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
h1 .accent {
  background: linear-gradient(100deg, var(--blue-bright), var(--orange-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline {
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 auto 30px;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.6;
}

/* Unique seismic charge meter (indeterminate, themed to the game) */
.charge {
  width: min(440px, 86vw);
  margin: 0 auto;
}
/* Label row above the tiles with a live percentage */
.charge-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.charge-pct {
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--blue-bright);
  font-variant-numeric: tabular-nums;
}

/* Chain reaction loader: territory tiles fill with stress one by one
   and STAY filled as the percentage climbs, then reset and repeat. */
.collapse-loader {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
  height: 42px;
}
.q-tile {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(160deg, #1c2745, #131c34);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform-origin: bottom center;
  transition: background 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
}
/* A filled tile lights up molten orange and holds that state */
.q-tile.filled {
  background: linear-gradient(160deg, #ffb347, #ff7a1a);
  border-color: rgba(255, 179, 71, 1);
  box-shadow: 0 0 20px rgba(255, 122, 26, 0.7);
}
/* The instant a tile fills it flares brighter and shakes hard */
.q-tile.fresh {
  box-shadow: 0 0 32px rgba(255, 122, 26, 1);
  animation: tileShake 0.38s ease;
}
@keyframes tileShake {
  0%, 100% { transform: translate(0, 0) rotate(0) scale(1); }
  12% { transform: translate(-5px, 2px) rotate(-4deg) scale(1.16); }
  26% { transform: translate(5px, -3px) rotate(4deg) scale(1.18); }
  40% { transform: translate(-5px, 2px) rotate(-3deg) scale(1.15); }
  54% { transform: translate(4px, 2px) rotate(3deg) scale(1.13); }
  68% { transform: translate(-3px, -1px) rotate(-2deg) scale(1.1); }
  82% { transform: translate(2px, 1px) rotate(1deg) scale(1.05); }
}
/* Slow fade out once the board is charged, before it restarts */
.collapse-loader.fading .q-tile {
  transition: background 1.1s ease, border-color 1.1s ease,
    box-shadow 1.1s ease, opacity 1.1s ease;
  opacity: 0.35;
}
.charge-status {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-muted);
  min-height: 1.2em;
}
.charge-status .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange-bright);
  margin-right: 8px;
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.launch-note {
  margin-top: 30px;
  font-size: 0.92rem;
  color: var(--text-dim);
}
.launch-note b { color: var(--text); }

footer {
  padding: 22px 24px 28px;
  color: var(--text-dim);
  font-size: 0.86rem;
}
footer a {
  color: var(--blue-bright);
  text-decoration: none;
}
footer a:hover { color: var(--orange-bright); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  /* The .filled tiles applied by script keep their orange look,
     just without the shake or fade. */
}
