:root {
  --brand: #3d00cc;
  --brand-glow: rgba(61,0,204,0.4);
  --hero-bg: #3d00cc;
  --btn-bg: #F59E0B;
}
html{font-size:17px;visibility:hidden;}
html.fonts-loaded{visibility:visible;}
body { font-family:"Inter",sans-serif; background:#200070; }
.font-game { font-family:"Bungee","Arial Black",Impact,system-ui,sans-serif; }
.font-display { font-family:"Lexend",sans-serif; }
.floating-nav{
  background:transparent;
  border:1px solid transparent;
  box-shadow:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  border-radius:999px;
  padding-block:0.15rem;
  transition:
    background-color .28s ease,
    border-color .28s ease,
    box-shadow .28s ease,
    backdrop-filter .28s ease,
    -webkit-backdrop-filter .28s ease;
}
.floating-nav.nav-on-light{
  background:rgba(255,255,255,.78);
  border-color:rgba(61,0,204,.22);
  box-shadow:0 12px 28px rgba(26,0,102,.16);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-radius:999px;
}

.nav-hide-down{
  top:-6rem !important; /* slide straight up off screen */
}
.floating-nav.nav-on-light a{
  color:rgba(61,0,204,.78) !important;
}
.floating-nav.nav-on-light a:hover{
  color:#2a0099 !important;
}
.floating-nav.nav-on-light button{
  color:#2a0099 !important;
  border-color:rgba(61,0,204,.24) !important;
  background:rgba(61,0,204,.06) !important;
}
.floating-nav.nav-on-light button:hover{
  background:rgba(61,0,204,.12) !important;
}

.floating-nav.nav-on-light .nav-contact{
  color:#2a0099 !important;
  border-color:rgba(61,0,204,.24) !important;
  background:rgba(61,0,204,.10) !important;
}
.floating-nav.nav-on-light .nav-contact:hover{
  background:rgba(61,0,204,.16) !important;
}

.nav-panel{
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 18px 40px rgba(0,0,0,.25);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.floating-nav.nav-on-light .nav-panel{
  background:rgba(255,255,255,.92);
  border-color:rgba(61,0,204,.18);
  box-shadow:0 18px 40px rgba(26,0,102,.12);
}

.potential-word {
  font-style: normal;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: inline-block;
  /* Original palette. */
  background: linear-gradient(90deg, #3B82F6 0%, #8B5CF6 52%, #F59E0B 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

/* ─── Roadmap ─── */
#roadmap-canvas {
  width: 100%;
  height: 780px;
  display: block;
}

.tiktok-carousel {
  position: relative;
  width: 280px;
  height: 560px;
  margin: 0 auto;
  perspective: 1400px;
  transform: translateZ(0);
}
.tiktok-slide {
  position: absolute;
  inset: 0;
  transition: transform 560ms cubic-bezier(0.22, 1, 0.36, 1), opacity 560ms ease;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.tiktok-slide.state-center { transform: translateX(0) scale(1) rotateY(0deg); opacity: 1; z-index: 3; }
.tiktok-slide.state-left { transform: translateX(-58px) scale(0.9) rotateY(18deg); opacity: 0.62; z-index: 2; }
.tiktok-slide.state-right { transform: translateX(58px) scale(0.9) rotateY(-18deg); opacity: 0.62; z-index: 2; }
.phone-shell {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 2.5rem;
  padding: 9px;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background:
    radial-gradient(120% 120% at 0% 0%, #4a4a4a 0%, #1e1e1e 36%, #101010 100%);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow:
    0 42px 90px rgba(0,0,0,0.42),
    0 14px 26px rgba(61,0,204,0.16),
    inset 0 0 0 1px rgba(255,255,255,0.08);
}
.phone-shell::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg,#0c0c0c,#181818);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
  z-index: 6;
}
.phone-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2.5rem;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 34%),
    linear-gradient(300deg, rgba(255,255,255,0.06), rgba(255,255,255,0) 45%);
}
.phone-screen {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 2rem;
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: paint;
}
.phone-screen video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.phone-btn {
  position: absolute;
  z-index: 7;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg,#9e9e9e,#5e5e5e);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}
.phone-btn.power { right: -2px; top: 28%; height: 64px; }
.phone-btn.vol-up { left: -2px; top: 23%; height: 46px; }
.phone-btn.vol-down { left: -2px; top: 32%; height: 46px; }
.tiktok-dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: rgba(61,0,204,0.25);
  border: 1px solid rgba(61,0,204,0.35);
  cursor: pointer;
}
.tiktok-dot.active {
  background: #3d00cc;
  border-color: #3d00cc;
}

/* iOS/WebKit can flicker videos during scroll when inside 3D transformed elements. */
@supports (-webkit-touch-callout: none) {
  .tiktok-carousel { perspective: none; }
  .tiktok-slide { transform-style: flat; }
  .tiktok-slide.state-left { transform: translateX(-58px) scale(0.9); }
  .tiktok-slide.state-right { transform: translateX(58px) scale(0.9); }
  /* Force stable rounded clipping for inline video during scroll. */
  .phone-screen {
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    contain: none;
  }
}

/* ─── Pensight modal overrides: center and square it up ─── */
.pensight-modal-root .pensight-backdrop {
  align-items: center !important; /* vertically center instead of bottom-attached */
}

.pensight-modal-root .pensight-content {
  border-radius: 16px !important;          /* rounded on all corners */
  max-height: 98vh !important;             /* allow it to get almost full height */
  min-height: 80vh !important;             /* a bit taller than before */
  height: auto !important;                 /* let content set height within bounds */
  margin: 0 auto !important;               /* keep it centered horizontally */
}
