/* SPOTTI CDN origin — spottibotcdn only */
:root {
  color-scheme: dark;
  --void: oklch(0.055 0.018 278);
  --void-2: oklch(0.09 0.028 278);
  --ink: oklch(0.94 0.012 278);
  --mute: oklch(0.58 0.03 278);
  --cyan: oklch(0.78 0.17 205);
  --violet: oklch(0.68 0.24 285);
  --rose: oklch(0.62 0.22 12);
  --glass: oklch(0.14 0.03 278 / 0.55);
  --line: oklch(0.98 0.01 278 / 0.08);
}

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

html, body {
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background: var(--void);
  color: var(--ink);
}

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.sheen {
  position: fixed;
  inset: -30%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 72% 28%, oklch(0.55 0.22 285 / 0.22), transparent 60%),
    radial-gradient(ellipse 40% 35% at 18% 72%, oklch(0.5 0.16 205 / 0.14), transparent 65%);
  animation: sheen-drift 24s ease-in-out infinite alternate;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 80% at 50% 45%, transparent 35%, var(--void) 88%);
}

@keyframes sheen-drift {
  from { transform: translate3d(-2%, 0, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.05); }
}

.frame {
  position: relative;
  z-index: 3;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  max-width: 1400px;
  margin: 0 auto;
}

.viewport-hero {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
}

/* Hero split */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: clamp(1rem, 6vh, 3rem) 0;
}

.hero-copy {
  max-width: 34rem;
  animation: rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}

.display {
  font-family: Syne, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 9.5vw, 6.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 1.75rem;
}

.title-row {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.28em;
  white-space: nowrap;
}

.word {
  display: inline-block;
  overflow: hidden;
}

.word-solid {
  color: var(--ink);
}

.word-accent {
  color: transparent;
  background: linear-gradient(100deg, var(--cyan) 0%, var(--violet) 48%, var(--rose) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 40px oklch(0.65 0.2 285 / 0.35));
}

.stats {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  max-width: 38rem;
}

.stat {
  display: grid;
  gap: 0.2rem;
}

.stat-val {
  font-family: Syne, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.35rem, 3.8vw, 2rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.stat-val-sm {
  font-size: clamp(1.1rem, 3vw, 1.55rem);
  letter-spacing: -0.02em;
}

.stat-lbl {
  font-size: 0.76rem;
  line-height: 1.4;
  color: oklch(0.52 0.04 278);
  max-width: 26ch;
}

.stat-link {
  color: oklch(0.78 0.14 205);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid oklch(0.78 0.14 205 / 0.35);
  transition: color 0.2s ease-out, border-color 0.2s ease-out;
}

.stat-link:hover {
  color: oklch(0.88 0.12 205);
  border-bottom-color: oklch(0.88 0.12 205 / 0.7);
}

.stat-link:active {
  transform: scale(0.98);
}

/* NCS-style orb */
.ncs-orb {
  position: relative;
  width: min(420px, 78vw);
  aspect-ratio: 1;
  margin-inline: auto;
  animation: rise 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
}

#ncsOrb {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
}

.ncs-feed {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 58%;
  max-width: 14rem;
  transform: translate(-50%, -50%);
  margin: 0;
  text-align: center;
  pointer-events: none;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: clamp(0.58rem, 1.35vw, 0.74rem);
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: 0.01em;
  color: oklch(0.86 0.09 205);
  text-wrap: balance;
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ncs-feed.is-fading {
  opacity: 0;
}

.ncs-halo {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  z-index: 1;
  background: radial-gradient(
    circle,
    oklch(0.72 0.16 205 / 0.45) 0%,
    oklch(0.62 0.14 205 / 0.18) 38%,
    transparent 72%
  );
  filter: blur(22px);
  animation: ncs-halo-pulse 3.5s ease-in-out infinite;
}

.ncs-shadow {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  z-index: 0;
  background: radial-gradient(circle, oklch(0.04 0.02 278 / 0.9), transparent 70%);
  transform: translateY(8%) scale(0.92);
  filter: blur(18px);
}

@keyframes ncs-halo-pulse {
  0%, 100% { opacity: 0.65; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* Footer */
.foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  animation: rise 1s ease-out 0.35s both;
}

.foot-uptime {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: oklch(0.55 0.06 278);
}

/* Ecosystem status (scroll) */
.eco {
  margin-top: clamp(3rem, 10vh, 6rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid oklch(0.98 0.01 278 / 0.07);
  border-radius: 20px;
  background:
    linear-gradient(160deg, oklch(0.12 0.03 278 / 0.92), oklch(0.08 0.025 278 / 0.78)),
    radial-gradient(ellipse 80% 60% at 100% 0%, oklch(0.55 0.18 205 / 0.12), transparent 55%);
  box-shadow: 0 24px 80px oklch(0.02 0.02 278 / 0.55);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.eco.eco-visible {
  opacity: 1;
  transform: none;
}

.eco-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.eco-title {
  font-family: Syne, system-ui, sans-serif;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.eco-sub {
  font-size: 0.82rem;
  color: oklch(0.55 0.04 278);
  max-width: 42ch;
  line-height: 1.45;
}

.eco-ring {
  position: relative;
  width: 7.5rem;
  height: 7.5rem;
  flex-shrink: 0;
}

.eco-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.eco-ring-track {
  fill: none;
  stroke: oklch(0.98 0.01 278 / 0.08);
  stroke-width: 8;
}

.eco-ring-fill {
  fill: none;
  stroke: oklch(0.78 0.16 205);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 12px oklch(0.72 0.16 205 / 0.45));
}

.eco-ring-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1;
}

.eco-overall-val {
  font-family: Syne, system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

.eco-overall-unit {
  font-size: 0.75rem;
  color: oklch(0.58 0.05 278);
  margin-left: 0.05rem;
}

.eco-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.eco-card {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: oklch(0.1 0.025 278 / 0.65);
  border: 1px solid oklch(0.98 0.01 278 / 0.06);
}

.eco-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.eco-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: oklch(0.82 0.03 278);
}

.eco-pct {
  font-family: Syne, system-ui, sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.eco-good .eco-pct { color: oklch(0.78 0.14 205); }
.eco-warn .eco-pct { color: oklch(0.78 0.16 85); }
.eco-bad .eco-pct { color: oklch(0.68 0.2 12); }

.eco-bar {
  height: 5px;
  border-radius: 999px;
  background: oklch(0.98 0.01 278 / 0.08);
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.eco-bar-fill {
  display: block;
  height: 100%;
  width: calc(var(--pct, 0) * 1%);
  border-radius: inherit;
  background: oklch(0.78 0.14 205);
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 14px oklch(0.72 0.16 205 / 0.35);
}

.eco-warn .eco-bar-fill {
  background: oklch(0.78 0.16 85);
  box-shadow: 0 0 14px oklch(0.72 0.14 85 / 0.3);
}

.eco-bad .eco-bar-fill {
  background: oklch(0.68 0.2 12);
  box-shadow: 0 0 14px oklch(0.62 0.18 12 / 0.35);
}

.eco-detail {
  font-size: 0.68rem;
  line-height: 1.35;
  color: oklch(0.5 0.04 278);
}

.eco-updated {
  margin-top: 1.1rem;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: oklch(0.48 0.04 278);
  font-variant-numeric: tabular-nums;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

/* Letter reveal */
[data-split] {
  display: inline-block;
}

.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%) rotateX(-40deg);
  animation: char-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: 50% 100%;
}

@keyframes char-in {
  to { opacity: 1; transform: none; }
}

/* SNI fallback page */
.fallback-center {
  place-content: center;
  text-align: center;
}

.fallback-title {
  font-size: clamp(2rem, 8vw, 3.5rem);
}

.fallback-lede {
  margin: 1rem auto 0;
}

.fallback-link {
  color: oklch(0.78 0.17 205);
}

/* Mobile */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .ncs-orb {
    order: -1;
    width: min(300px, 85vw);
    margin-bottom: 0.5rem;
  }
  .hero-copy { max-width: none; }
  .display { font-size: clamp(3rem, 16vw, 4.5rem); }
  .stats { grid-template-columns: 1fr; gap: 0.9rem; }
  .stat-lbl { max-width: none; }
  .eco-grid { grid-template-columns: 1fr; }
  .eco-head { flex-direction: column-reverse; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .sheen, .ncs-halo, .ncs-feed, .hero-copy, .ncs-orb, .foot, .eco {
    animation: none !important;
  }
  .char { opacity: 1; transform: none; animation: none; }
}
