/* ═══════════════════════════════════════════════
   BHCTech — style.css
   Custom CSS (Tailwind utility classes stay in HTML)
   ═══════════════════════════════════════════════ */

/* ── Base ── */
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #08090b;
  color: #d1d5db;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.font-display { font-family: 'Inter Tight', system-ui, sans-serif; letter-spacing: -0.03em; }

/* ── Hero canvas ── */
#networkCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
}

/* ── Hero glow ── */
.hero-glow {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.hero-glow::before {
  content: ''; position: absolute; width: 50vw; height: 50vw;
  left: 50%; top: -10vw; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(99,102,241,0.18), transparent 65%);
  filter: blur(80px); border-radius: 50%;
}

/* ── Grain ── */
.grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.15; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Section alternation ── */
.bg-section-alt { background: #0e1018; }
.section-fade-in  { background: linear-gradient(180deg, #08090b 0%, #0e1018 100%); height: 80px; }
.section-fade-out { background: linear-gradient(180deg, #0e1018 0%, #08090b 100%); height: 80px; }
.section-fade-dark { background: linear-gradient(180deg, #08090b 0%, #040508 100%); height: 60px; }

/* ── Cards: surface ── */
.surface {
  background: linear-gradient(180deg, rgba(20,22,31,0.8) 0%, rgba(10,12,18,0.9) 100%);
  border: 1px solid rgba(255,255,255,0.06);
}

/* ── Cards: mouse-tracking glow overlay ── */
.card-interactive {
  position: relative;
  overflow: hidden;
  transition: border-color .35s, transform .4s cubic-bezier(.2,.8,.2,1);
}
.card-interactive::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    500px circle at var(--mx, 50%) var(--my, 50%),
    var(--glow-color, rgba(99,102,241,0.12)),
    transparent 55%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s;
}
.card-interactive:hover::after { opacity: 1; }
.card-interactive:hover { border-color: var(--border-hover, rgba(255,255,255,0.12)); }

/* ── Cards: brand-specific glow colors ── */
.glow-indigo { --glow-color: rgba(99,102,241,0.12); --border-hover: rgba(99,102,241,0.25); }
.glow-sky    { --glow-color: rgba(56,189,248,0.12); --border-hover: rgba(56,189,248,0.25); }
.glow-amber  { --glow-color: rgba(245,158,11,0.10); --border-hover: rgba(245,158,11,0.25); }

/* ── Cards: top-edge accent line ── */
.edge-indigo::before {
  content:''; position:absolute; top:-1px; left:15%; right:15%; height:2px; border-radius:2px;
  background: linear-gradient(90deg, transparent, #6366f1, #22d3ee, transparent);
}
.edge-sky::before {
  content:''; position:absolute; top:-1px; left:15%; right:15%; height:2px; border-radius:2px;
  background: linear-gradient(90deg, transparent, #1e88e5, #38bdf8, transparent);
}
.edge-amber::before {
  content:''; position:absolute; top:-1px; left:15%; right:15%; height:2px; border-radius:2px;
  background: linear-gradient(90deg, transparent, #0e7490, #f59e0b, transparent);
}

/* ── Cards: watermark number ── */
.card-watermark {
  position: absolute;
  top: -8px; right: 12px;
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-weight: 800;
  font-size: 96px;
  line-height: 1;
  letter-spacing: -0.06em;
  color: rgba(255,255,255,0.025);
  pointer-events: none;
  user-select: none;
}

/* ── Glassmorphism logo container ── */
.logo-glass {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
}
.logo-glass img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* white logo tile (for brand strip - legacy, kept for compatibility) */
.logo-tile {
  background: #fff; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.logo-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Brand strip chip: glass treatment + grayscale logos (uniform optical weight) */
.brand-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background-color .3s, border-color .3s, transform .3s;
}
.brand-chip:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}
.brand-logo-img {
  filter: grayscale(1) brightness(2) contrast(0.9);
  opacity: 0.65;
  transition: filter .35s, opacity .35s;
}
.brand-chip:hover .brand-logo-img {
  filter: none;
  opacity: 1;
}

/* ── Nav scroll state ── */
[data-nav] nav { transition: background-color .3s, border-color .3s, box-shadow .3s; }
[data-nav].scrolled nav {
  background-color: rgba(8,9,11,0.88);
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px -8px rgba(0,0,0,0.6);
}

/* ── Mobile menu animation ── */
#mobileMenu {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .4s cubic-bezier(.2,.8,.2,1), opacity .3s ease;
  pointer-events: none;
}
#mobileMenu.open {
  max-height: 320px;
  opacity: 1;
  pointer-events: auto;
}

/* ── Reveal on scroll ── */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
.reveal-d4 { transition-delay: .4s; }

/* ── Utilities ── */
:focus-visible { outline: 2px solid #6366f1; outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(99,102,241,0.3); color: #fff; }

/* ── Accessibility: reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  #networkCanvas { display: none; }
}

/* ── About diagram ── */
.diagram-node {
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(20,22,31,0.9) 0%, rgba(14,16,24,0.95) 100%);
  border: 1px solid rgba(255,255,255,0.08);
}
