/* ----------------------------------------------

   SideGuy Solutions · Bulletproof Superbuild 4.1

   Global Stylesheet (Never Breaks)

   Author: PJ + ChatGPT

---------------------------------------------- */



/* RESET */

* {

  margin: 0;

  padding: 0;

  box-sizing: border-box;

}



/* BODY */

body {
  font-family: -apple-system, Inter, sans-serif;
  background: #f0f9ff;
  color: #033045;
  overflow-x: hidden;
}



/* PAGE WRAPPER */

.page {

  max-width: 1200px;

  margin: auto;

  padding: 20px;

}



/* HEADER */

.header {

  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 32px;

}



.header .brand {

  font-size: 26px;

  font-weight: 800;

  color: #005b96;

}



.header nav a {

  margin-right: 16px;

  color: #005b96;

  text-decoration: none;

  font-weight: 500;

}



.header nav a:hover {

  opacity: 0.6;

}



.textpj {

  background: #00cc88;

  color: white;

  padding: 8px 16px;

  border-radius: 22px;

  text-decoration: none;

  font-weight: 600;

  box-shadow: 0 0 10px rgba(0, 255, 163, 0.3);

}



/* SECTION */

.section {

  margin-bottom: 50px;

}



.section h2 {

  font-size: 30px;

  margin-bottom: 18px;

  font-weight: 700;

  color: #004e7f;

  text-align: center;

}



/* CARD GRID */

.card-grid {

  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));

  gap: 22px;

}



/* CARD */

.card {

  background: white;

  padding: 22px;

  border-radius: 18px;

  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);

  border: 1px solid rgba(255, 255, 255, 0.4);

  transition: 0.2s ease;

}



.card:hover {

  transform: translateY(-4px);

}



.card h3 {

  font-size: 20px;

  margin-bottom: 10px;

  color: #033045;

}



.card p {

  font-size: 15px;

  opacity: 0.85;

}



/* DOT */

.dot {

  width: 12px;

  height: 12px;

  background: #21d879;

  border-radius: 50%;

  margin-bottom: 10px;

  box-shadow: 0 0 8px rgba(0, 255, 163, 0.4);

}



/* TIMESTAMP */

.timestamp {

  text-align: center;

  font-size: 14px;

  color: #004e7f;

  opacity: 0.8;

  margin-bottom: 30px;

}



/* TWITTER SECTION */

.twitter-holder {

  background: rgba(255, 255, 255, 0.65);

  padding: 24px;

  border-radius: 20px;

  box-shadow: 0 0 14px rgba(0, 0, 0, 0.06);

}



/* FOOTER */

.footer {

  margin-top: 50px;

  padding: 40px 10px;

  text-align: center;

  font-size: 14px;

  opacity: 0.8;

  color: #033045;

}

/* =========================================================
   ONE PJ SYSTEM — single source of truth for mobile + desktop
   ========================================================= */

/* Kill duplicates */
.humanOrb        { display: none !important; }
.pj-avatar-shell { display: none !important; }
.sg-pj-avatar-fab { display: none !important; }
.sg-avatar-fab    { display: none !important; }
.pj-avatar-float  { display: none !important; }

/* Prevent horizontal overflow */
body { overflow-x: hidden; }

/* sg-hero must stack vertically — never allow injected children to sit beside hero content */
.sg-hero { flex-direction: column !important; }
.sg-hero-inner { width: 100% !important; max-width: 1040px; }

/* ── MOBILE: kill ALL floating UI except bottom bar ── */
@media (max-width: 768px) {
  #sg-exp-btn,
  #sg-pj-orb,
  .pjDock,
  .sgTextDock,
  .sg-floating-text,
  .text-pj-float,
  .sgExplainPill,
  .explain-pill,
  .sgExplainFloat,
  .pj-avatar-shell,
  .humanOrb,
  .sg-ambient-orb,
  .sg-pj-avatar-fab,
  .sg-avatar-fab,
  .pj-avatar-float {
    display: none !important;
  }
}

/* ── ONE SYSTEM: bar on mobile, orb nowhere ── */
#sg-pj-orb        { display: none !important; }
#sg-pj-mobile-bar { display: none; }

/* ── MOBILE GLOBAL SAFETY ── */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  *, *::before, *::after {
    max-width: 100%;
  }
  section, main, article, div {
    max-width: 100vw;
  }
  body { padding-bottom: 110px; }
  h1, h2, h3 { line-height: 1.2; }

  /* Hero: single column, no card */
  .hero-wrap {
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
  }
  .hero-visual { display: none !important; }
  .hero-text {
    text-align: center !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
  }
  .sg-hero {
    padding: 48px 20px 120px !important;
    min-height: auto !important;
    text-align: center !important;
    overflow: hidden !important;
  }
  .sg-hero-inner {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }
  .sg-hero-cta {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
  .sg-hero-secondary {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }
}

/* PJ TAP-TO-EXPAND ORB — mobile only */
#sg-pj-orb-wrap { display: none; }

@media (max-width: 768px) {
  #sg-pj-orb-wrap {
    display: flex;
    align-items: center;
    position: fixed;
    bottom: calc(16px + env(safe-area-inset-bottom));
    right: 16px;
    z-index: 9999;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  body.scrolling #sg-pj-orb-wrap {
    transform: translateY(80px);
    opacity: 0.4;
  }

  /* The circle */
  #sg-pj-orb-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    background: white;
    box-shadow: 0 6px 24px rgba(0,0,0,0.2), 0 0 0 3px rgba(14,165,233,.2);
    animation: pjPulse 2.5s infinite;
  }
  #sg-pj-orb-circle img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 15%;
    display: block;
  }

  /* Expand panel — hidden by default */
  #sg-pj-orb-panel {
    display: none;
    align-items: center;
    gap: 10px;
    margin-right: 10px;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 18px;
    padding: 10px 14px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.15);
    white-space: nowrap;
  }
  #sg-pj-orb-info {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    color: #0a2540;
  }
  #sg-pj-orb-info strong { font-size: 15px; font-weight: 700; }
  #sg-pj-orb-info span { opacity: .6; font-size: 12px; }
  #sg-pj-orb-btn {
    padding: 9px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg,#19c37d,#0ea5e9);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(14,165,233,.3);
  }

  /* Open state */
  #sg-pj-orb-wrap.sg-orb-open #sg-pj-orb-panel {
    display: flex;
  }
  #sg-pj-orb-wrap.sg-orb-open #sg-pj-orb-circle {
    animation: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  }
}

/* PJ MODAL */
.pj-modal {
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, #0a1a2f, #0f2c3d);
  z-index: 99999;
  display: none;
  flex-direction: column;
}
.pj-modal.active { display: flex; }
.pj-modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  color: white;
}
.pj-modal .pj-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.pj-modal .pj-avatar-large {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  object-fit: cover; object-position: center 15%;
}
.pj-modal .pj-title { font-size: 17px; font-weight: 800; }
.pj-modal .pj-sub   { font-size: 12px; opacity: .6; margin-top: 2px; }
.pj-chat-area {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.pj-message {
  background: rgba(255,255,255,.10);
  padding: 12px 16px;
  border-radius: 18px 18px 18px 4px;
  max-width: 75%;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 10px;
}
.pj-input {
  display: flex; gap: 10px;
  margin-top: 14px;
  position: sticky; bottom: 0;
  background: rgba(10,26,47,.95);
  padding: 10px 0;
  backdrop-filter: blur(10px);
}
.pj-input input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: white;
  font-size: 16px;
  outline: none;
}
.pj-input input::placeholder { color: rgba(255,255,255,.4); }
.pj-input button {
  padding: 12px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg,#19c37d,#0ea5e9);
  color: white; border: none;
  font-weight: 700; cursor: pointer; min-height: 44px;
}
.pj-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 20px;
  font-size: 28px;
  cursor: pointer; opacity: .7;
  color: white; z-index: 10;
}

/* Flywheel — preserve light text on dark background */
section[aria-label="SideGuy flywheel"] p,
section[aria-label="SideGuy flywheel"] div,
section[aria-label="SideGuy flywheel"] span { color: inherit !important; }

/* TOPBAR — always white, always readable */
.topbar {
  background: rgba(255,255,255,.97) !important;
  border-bottom: 1.5px solid rgba(0,150,200,.14) !important;
  box-shadow: 0 2px 16px rgba(0,120,180,.08) !important;
  backdrop-filter: blur(20px) !important;
  overflow: hidden;
}
@media (max-width: 768px) {
  .topbar {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px !important;
  }
  .topbar-hide-mobile { display: none !important; }
  .topbar .homePill { display: none !important; }
}
body:not(.sg-passed-hero) .topbar {
  background: rgba(255,255,255,.97) !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.topbar a, .topbar button, .topbar div {
  color: #0b1f2a !important;
  opacity: 1 !important;
}

/* ── PJ MOBILE BAR: MOVIE SYSTEM ── */
@keyframes pjPulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 200, 255, 0.4); }
  70%  { box-shadow: 0 0 0 12px rgba(0, 200, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 200, 255, 0); }
}

