/* ===== V2 UPGRADES ===== */

/* cursor label */
#cur {
  display: grid;
  place-items: center;
}
#cur .cur-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  white-space: nowrap;
  opacity: 0;
  color: #fff;
  mix-blend-mode: difference;
  transition: opacity 0.25s, transform 0.35s var(--ease-out);
  pointer-events: none;
}
#cur.on-label {
  width: 88px !important;
  height: 88px !important;
  margin: -44px 0 0 -44px !important;
}
#cur.on-label .cur-label {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* clock + fps hud */
.hud-live {
  position: fixed;
  left: var(--pad-x);
  bottom: 1.5rem;
  z-index: 50;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--dim);
  mix-blend-mode: difference;
  display: flex;
  gap: 1.25rem;
  pointer-events: none;
}
.hud-live b {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

/* role rotator */
.role-rotator {
  height: 1.35em;
  overflow: hidden;
  display: inline-block;
  vertical-align: bottom;
  min-width: 18ch;
  text-align: left;
  position: relative;
}
.role-rotator .role-track {
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.role-rotator span {
  display: block;
  height: 1.35em;
  line-height: 1.35em;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.95em;
  letter-spacing: 0.14em;
}

/* ===== TELEMETRY BOARD ===== */
.tele {
  padding: clamp(3rem, 8vh, 5.5rem) var(--pad-x);
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}
.tele-inner {
  border-radius: 28px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%, rgba(124, 58, 237, 0.22), transparent 50%),
    radial-gradient(ellipse 50% 40% at 90% 100%, rgba(251, 113, 133, 0.1), transparent 45%),
    rgba(8, 8, 14, 0.75);
  backdrop-filter: blur(22px);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 30px 80px rgba(0, 0, 0, 0.35),
    0 0 60px rgba(124, 58, 237, 0.12);
  overflow: hidden;
  position: relative;
}
.tele-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.03) 50%,
    transparent 60%
  );
  animation: teleSheen 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes teleSheen {
  0%, 100% { transform: translateX(-40%); opacity: 0; }
  40% { opacity: 1; }
  70% { transform: translateX(40%); opacity: 0; }
}

.tele-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.35rem;
  position: relative;
  z-index: 1;
}
.tele-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--ok);
}
.tele-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 12px var(--ok);
  animation: pipeBlink 1.3s ease-in-out infinite;
}
.tele-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}
.tele-tag.dim { color: var(--dim); margin-left: auto; }

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}
.stat {
  position: relative;
  text-align: center;
  padding: 1.35rem 0.85rem 1.1rem;
  border-radius: 20px;
  border: 1px solid rgba(167, 139, 250, 0.18);
  background:
    radial-gradient(circle at 50% 0%, rgba(167, 139, 250, 0.14), transparent 55%),
    rgba(6, 6, 12, 0.75);
  overflow: hidden;
  transition: border-color 0.35s, transform 0.4s var(--ease-out), box-shadow 0.4s;
}
.stat:hover {
  border-color: rgba(167, 139, 250, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(124, 58, 237, 0.15);
}
.stat-ring {
  --p: 0;
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 0.85rem;
}
.stat-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.stat-ring .sr-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 4;
}
.stat-ring .sr-fg {
  fill: none;
  stroke: #a78bfa;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100; /* empty until .is-on */
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.7));
  transition: stroke-dashoffset 1.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.stat.is-on .sr-fg {
  stroke-dashoffset: calc(100 - var(--p, 0));
}
.stat-ring strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #fff 20%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transform: rotate(0deg);
}
.stat em {
  display: block;
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin-bottom: 0.65rem;
}
.stat-spark {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 22px;
  margin-bottom: 0.55rem;
}
.stat-spark b {
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(to top, var(--accent-deep), var(--accent));
  height: 40%;
  opacity: 0.5;
  animation: teleBar 1.4s ease-in-out infinite;
}
.stat-spark b:nth-child(2) { animation-delay: 0.1s; height: 70%; }
.stat-spark b:nth-child(3) { animation-delay: 0.2s; height: 50%; }
.stat-spark b:nth-child(4) { animation-delay: 0.05s; height: 90%; }
.stat-spark b:nth-child(5) { animation-delay: 0.25s; height: 55%; }
.stat-spark b:nth-child(6) { animation-delay: 0.15s; height: 75%; }
.stat-spark b:nth-child(7) { animation-delay: 0.3s; height: 45%; }
@keyframes teleBar {
  0%, 100% { transform: scaleY(0.45); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}
.stat-foot {
  display: block;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: rgba(167, 139, 250, 0.55);
}
.stat-zero .sr-fg {
  stroke: rgba(251, 113, 133, 0.55);
  filter: drop-shadow(0 0 6px rgba(251, 113, 133, 0.5));
}
.stat-zero .stat-spark b {
  background: linear-gradient(to top, #7f1d1d, var(--hot));
}

.tele-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 1.1rem;
  position: relative;
  z-index: 1;
}
.tele-divider span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--accent);
  white-space: nowrap;
}
.tele-divider i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.45), transparent);
}

/* domain strip */
.domain-strip {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  margin: 0 -0.25rem;
  position: relative;
  z-index: 1;
}
.domain-track {
  display: flex;
  gap: 0.85rem;
  width: max-content;
  will-change: transform;
  padding: 0.25rem 0 0.5rem;
}
.domain-card {
  flex: 0 0 auto;
  width: min(260px, 72vw);
  min-height: 200px;
  border-radius: 18px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background:
    radial-gradient(circle at 20% 0%, rgba(167, 139, 250, 0.22), transparent 50%),
    rgba(8, 8, 14, 0.85);
  padding: 1.15rem 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition:
    border-color 0.35s,
    transform 0.45s var(--ease-out),
    box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}
.domain-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: none;
  pointer-events: none;
}
.domain-card:hover {
  border-color: rgba(167, 139, 250, 0.5);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 40px rgba(124, 58, 237, 0.2);
}
.domain-card:hover::after {
  animation: dcShine 0.85s ease forwards;
}
@keyframes dcShine {
  to { transform: translateX(120%); }
}
.dc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.domain-card .d-code {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.d-badge {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  color: rgba(233, 213, 255, 0.65);
  background: rgba(124, 58, 237, 0.15);
}
.dc-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(124, 58, 237, 0.12);
  margin: 0.25rem 0 0.15rem;
}
.dc-icon svg { width: 18px; height: 18px; }
.domain-card h4 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.domain-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  flex: 1;
}
.dc-bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-top: 0.35rem;
}
.dc-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent), var(--hot));
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.6);
  transition: width 1.2s var(--ease-out);
}
.domain-card.is-on .dc-bar i,
.tele.is-on .dc-bar i {
  width: var(--w, 80%);
}

@media (max-width: 800px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .tele-tag.dim { margin-left: 0; width: 100%; }
}
@media (max-width: 480px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

html.reduced .tele-live i,
html.reduced .stat-spark b,
html.reduced .tele-inner::before {
  animation: none !important;
}

/* spotlight section */
.spotlight {
  position: relative;
  isolation: isolate;
}
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    500px 320px at var(--spot-x, 50%) var(--spot-y, 50%),
    rgba(167, 139, 250, 0.12),
    transparent 55%
  );
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s;
}
.spotlight:hover::before {
  opacity: 1;
}
.spotlight > * {
  position: relative;
  z-index: 1;
}

/* proof modal */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s, visibility 0.35s;
}
.modal-root.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 7, 0.72);
  backdrop-filter: blur(18px);
}
.modal {
  position: relative;
  width: min(640px, 100%);
  max-height: min(80vh, 720px);
  overflow: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-strong);
  background: linear-gradient(165deg, rgba(30, 20, 50, 0.95), rgba(8, 8, 12, 0.98));
  box-shadow: var(--sh-soft), var(--sh-glow);
  padding: 2rem 1.75rem 1.75rem;
  transform: translateY(30px) scale(0.96);
  transition: transform 0.45s var(--ease-out);
}
.modal-root.open .modal {
  transform: none;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.modal-close:hover {
  color: #fff;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}
.modal .m-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.modal h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
.modal p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0.85rem;
  font-size: 15px;
}
.modal .m-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.25rem;
}
.modal .m-meta span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 0.4rem 0.7rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  color: var(--muted);
}

.proof-card {
  cursor: pointer;
}
.proof-card .pc-open {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s;
}
.proof-card:hover .pc-open {
  opacity: 1;
  transform: none;
}

/* toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 90;
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line-strong);
  background: rgba(12, 12, 16, 0.92);
  backdrop-filter: blur(12px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--fg);
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--sh-soft);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.35s, transform 0.45s var(--ease-out);
}

/* nav active underline */
.top-links a {
  position: relative;
}
.top-links a:not(.pill)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.top-links a:not(.pill):hover::after,
.top-links a:not(.pill).active::after {
  transform: scaleX(1);
}

/* glitch flash */
.glitch-once {
  animation: glitch 0.45s steps(2, end);
}
@keyframes glitch {
  0% {
    transform: translate(0);
    filter: none;
  }
  20% {
    transform: translate(-3px, 1px);
    filter: hue-rotate(40deg);
  }
  40% {
    transform: translate(3px, -1px);
    filter: hue-rotate(-30deg);
  }
  60% {
    transform: translate(-2px, 0);
  }
  100% {
    transform: translate(0);
    filter: none;
  }
}

/* scroll skew wrapper */
#main {
  will-change: transform;
  transform-origin: center top;
}

/* big quote break */
.quote-break {
  min-height: auto;
  display: grid;
  place-items: center;
  padding: clamp(4rem, 10vh, 7rem) var(--pad-x);
  text-align: center;
  position: relative;
}
.quote-break blockquote {
  font-size: clamp(1.8rem, 5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  max-width: 16ch;
  margin: 0 auto;
}
.quote-break cite {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.28em;
  color: var(--dim);
}
.quote-break .q-line {
  overflow: hidden;
  display: block;
}
.quote-break .q-line span {
  display: inline-block;
}

/* copy email chip */
.copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.65rem 1rem;
  border-radius: var(--r-full);
  border: 1px dashed var(--line-strong);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.copy-chip:hover {
  color: #fff;
  border-color: var(--accent);
  background: rgba(167, 139, 250, 0.08);
}

/* mobile menu */
.nav-burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  place-items: center;
  gap: 5px;
  flex-direction: column;
}
.nav-burger i {
  display: block;
  width: 16px;
  height: 1.5px;
  background: #fff;
}
@media (max-width: 760px) {
  .nav-burger {
    display: flex;
  }
  .top-links {
    position: fixed;
    top: var(--header-h);
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: rgba(8, 8, 12, 0.95);
    backdrop-filter: blur(20px);
    mix-blend-mode: normal;
  }
  .top-links.open {
    display: flex;
  }
  .top-links a {
    display: block !important;
    padding: 0.9rem 1rem;
    opacity: 1;
    border-radius: 8px;
  }
  .top-links a:hover {
    background: rgba(255, 255, 255, 0.05);
  }
  .hud-live {
    display: none;
  }
}

/* footer upgrade */
footer.foot-pro {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
footer.foot-pro .foot-mid {
  font-family: var(--mono);
  letter-spacing: 0.28em;
  color: var(--accent);
  font-size: 10px;
}
footer.foot-pro .foot-right {
  text-align: right;
}
@media (max-width: 700px) {
  footer.foot-pro {
    grid-template-columns: 1fr;
    text-align: center;
  }
  footer.foot-pro .foot-right {
    text-align: center;
  }
}
