/**
 * Cuper public site theme — graphite / white environments, logo blue accent only.
 * Load last on index.html and marketing pages.
 */

:root {
  color-scheme: dark light;

  --cuper-blue: #0a84ff;
  --cu-blue: var(--cuper-blue);
  --cu-blue-soft: #409cff;
  --cu-glow: transparent;

  --bg: #0b0c0f;
  --bg-elev: #111318;
  --surface: #111318;
  --surface-2: #171a20;
  --surface-3: #20242b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f5f7;
  --text-sec: #c8cdd6;
  --muted: #a1a7b3;
  --muted-2: #6f7785;
  --silver: rgba(255, 255, 255, 0.04);

  --warn: #f59e0b;
  --danger: #ef4444;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 18px;
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.35);
  --ring: 0 0 0 2px rgba(10, 132, 255, 0.35);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-elev: #f7f8fa;
    --surface: #f7f8fa;
    --surface-2: #eef1f5;
    --surface-3: #e5e9f0;
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.12);
    --text: #111318;
    --text-sec: #3d4654;
    --muted: #667085;
    --muted-2: #98a2b3;
    --silver: rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.08);
  }

  html {
    background: #ffffff;
  }
}

html {
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--text);
}

/* No blue fog — solid canvas only */
.bg-fixed {
  background: var(--bg) !important;
}

a {
  color: var(--cuper-blue);
}

a:hover {
  color: #0066d6;
}

@media (prefers-color-scheme: light) {
  a:hover {
    color: #0055b3;
  }
}

/* Nav — layout only; no pill chrome (homepage inline styles own the bar) */
.site-nav-panel {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.logo span {
  color: var(--cuper-blue);
}

/* Buttons — blue is for primary CTA only */
.btn-primary {
  background: var(--cuper-blue) !important;
  background-image: none !important;
  color: #fff !important;
  box-shadow: none !important;
  border: 1px solid transparent !important;
}

.btn-primary:hover {
  background: #0077ed !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  backdrop-filter: none !important;
}

.btn-ghost:hover {
  border-color: var(--border-strong) !important;
  color: var(--text) !important;
  transform: translateY(-1px);
}

/* Section labels — muted text, blue accent rails in cuper-home.css */
.sec-label,
.home-sec-label {
  color: var(--muted) !important;
}

.home-sec-label::before,
.home-sec-label::after {
  opacity: 1 !important;
}

.sec-title,
.home-sec-title {
  color: var(--text) !important;
}

.sec-sub {
  color: var(--text-sec) !important;
}

/* Cards & surfaces — graphite / white, never blue-tinted */
.pcard,
.aud-card,
.step,
.brain,
.conv-card,
.xp-panel,
.proof-approval,
.ft-card,
.home-why-card,
.home-project-card,
.see-demo,
.intent-card,
.live-window,
.tri-device,
.works-strip,
.compare-col,
.hh-desktop {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  backdrop-filter: none !important;
}

.home-why-card.is-cuper,
.compare-col.is-cuper {
  border-color: var(--border-strong) !important;
  box-shadow: none !important;
}

/* Hero — calm, no glow */
.hero-logo img {
  filter: none !important;
}

.hero-kicker .pulse {
  background: var(--cuper-blue);
}

.billing-note {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
}

/* Remove blue decorative effects */
.tri-hub-ring,
.tri-hub-thinking::after,
.alive-signal .dash-animate,
.alive-signal .dash-animate-ring {
  background: var(--surface-2) !important;
  box-shadow: none !important;
  filter: none !important;
  animation: none !important;
}

.tri-hub-cap,
.alive-signal .dash-animate {
  color: var(--muted) !important;
}

.tri-screen .bubble {
  background: var(--surface-3) !important;
  border-color: var(--border) !important;
  color: var(--text-sec) !important;
}

@keyframes breathe-device {
  0%, 100% { box-shadow: var(--shadow-lg); }
  50% { box-shadow: var(--shadow-lg); }
}

/* Interactive demo — neutral window */
.xp-progress-fill,
.hh-progress-fill,
.live-progress-fill,
.see-progress-fill {
  background: var(--cuper-blue) !important;
  background-image: none !important;
}

.xp-progress-track,
.hh-progress-track {
  background: var(--silver) !important;
}

.xp-proj-item.is-active {
  background: var(--surface-2) !important;
  border-color: var(--border-strong) !important;
  color: var(--text) !important;
}

.xp-bubble-user,
.hh-msg-user,
.hh-phone-msg-user,
.see-bubble-user {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.xp-pill.is-provider.is-live,
.xp-pipe-step.is-active {
  color: var(--cuper-blue) !important;
  border-color: rgba(10, 132, 255, 0.35) !important;
}

.xp-pill,
.xp-bubble-cuper,
.hh-msg-agent,
.see-bubble-agent {
  background: var(--silver) !important;
  border-color: var(--border) !important;
}

.xp-stream-cursor,
.see-stream-cursor,
.hh-stream-cursor {
  background: var(--cuper-blue) !important;
}

.xp-wall-node.is-hub {
  border-color: var(--border-strong) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

.xp-memory-flash {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
}

.xp-memory-flash strong {
  color: var(--text) !important;
}

.xp-cap-rotate,
.intent-example,
.landing-flow span,
.landing-arrow {
  color: var(--muted) !important;
}

.xp-disc-chip.is-on {
  color: var(--cuper-blue) !important;
  border-color: rgba(10, 132, 255, 0.35) !important;
}

/* Hero visual */
.home-hero-visual.is-interactive:hover {
  box-shadow: 0 0 0 1px var(--border-strong) !important;
}

.hh-provider-chip.is-active {
  border-color: rgba(10, 132, 255, 0.45) !important;
  background: var(--surface-2) !important;
  box-shadow: none !important;
  color: var(--text) !important;
}

.hh-nav-item.is-active {
  color: var(--cuper-blue) !important;
}

.hh-beam {
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent) !important;
}

.hh-pipeline {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hh-pipeline li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted-2);
  opacity: 0.45;
  transition: opacity 0.25s, color 0.25s;
}

.hh-pipeline li.is-active {
  opacity: 1;
  color: var(--cuper-blue);
}

.hh-pipeline li.is-done {
  opacity: 0.75;
  color: var(--text-sec);
}

.hh-pipeline-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Trust / chips — neutral */
.home-chip,
.works-chip,
.see-agent-chip {
  background: var(--silver) !important;
  border-color: var(--border) !important;
  color: var(--text-sec) !important;
}

.see-agent-chip.is-active,
.home-connect-tags .is-on {
  border-color: rgba(10, 132, 255, 0.4) !important;
  color: var(--text) !important;
}

.home-pillar-icon--chat,
.home-pillar-icon--remember {
  color: var(--cuper-blue) !important;
}

.trust-row svg,
.proof-flow-bridge svg {
  color: var(--muted) !important;
}

.sticky-cta {
  background: var(--bg) !important;
  border-top: 1px solid var(--border) !important;
  box-shadow: none !important;
  backdrop-filter: blur(12px) !important;
}

@media (prefers-color-scheme: light) {
  .sticky-cta {
    background: rgba(255, 255, 255, 0.92) !important;
  }
}

/* How-it-works modal */
.hiw-dialog {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

.hiw-visual {
  background: var(--bg) !important;
  border-color: var(--border) !important;
}

.hiw-progress-node.is-active {
  border-color: var(--cuper-blue) !important;
  background: rgba(10, 132, 255, 0.12) !important;
}

.hiw-progress-line.is-done {
  background: var(--cuper-blue) !important;
}

.hiw-pill {
  border-color: rgba(10, 132, 255, 0.28) !important;
  background: var(--silver) !important;
  color: var(--text-sec) !important;
}

/* Mobile — less crowding above the fold; keep phone visible at smaller scale */
@media (max-width: 720px) {
  .home-trust-chips {
    display: none !important;
  }

  .hh-provider-picker,
  .hh-provider-hint {
    display: none !important;
  }

  .hh-scene {
    padding-right: 0.35rem;
  }

  .hh-phone {
    display: block !important;
    width: 36%;
    max-width: 132px;
    right: 0;
    bottom: 0;
  }

  .hh-beam {
    display: none !important;
  }

  .home-marquee-wrap {
    opacity: 0.65;
  }

  .see-agents {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover,
  .btn-ghost:hover {
    transform: none !important;
  }
}
