/* ============ BrightBlueByte — design system v5 ============ */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/space-grotesk-var.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #05070F;
  --bg-soft: #0A0F1E;
  --panel: rgba(148, 163, 184, 0.05);
  --ink: #F4F6FB;
  --muted: #8B93A7;
  --blue: #3B82F6;
  --cyan: #22D3EE;
  --line: rgba(148, 163, 184, 0.12);
  --display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container: 1200px;
  --grad: linear-gradient(92deg, #6EA8FF, var(--blue) 45%, var(--cyan));
}

* { margin: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--blue); text-decoration: none; }
::selection { background: rgba(59, 130, 246, 0.35); }

.container { max-width: var(--container); width: 100%; margin: 0 auto; padding: 0 28px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(5, 7, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.site-header .inner {
  max-width: var(--container); margin: 0 auto; padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em;
  color: var(--ink); white-space: nowrap;
}
.wordmark .blue { color: var(--blue); }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a {
  color: var(--muted); font-size: 0.92rem; font-weight: 500;
  transition: color .2s ease;
}
.site-nav a:hover, .site-nav a.active { color: var(--ink); }
.btn-cta {
  padding: 10px 20px; border-radius: 999px;
  background: var(--ink); color: #05070F !important;
  font-weight: 600; font-size: 0.9rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.35);
}

main { flex: 1; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 92svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 140px 28px 80px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px;
  background: rgba(148, 163, 184, 0.04);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.8rem, 8.5vw, 6.4rem);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.02;
  margin: 34px 0 0;
}
.hero p {
  max-width: 640px; margin: 28px auto 0;
  color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.2rem); line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; margin-top: 42px; flex-wrap: wrap; justify-content: center; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px;
  background: var(--grad); color: #fff !important;
  font-weight: 600; font-size: 0.98rem;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(59, 130, 246, 0.5); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink) !important;
  font-weight: 600; font-size: 0.98rem;
  transition: border-color .2s ease, background .2s ease;
}
.btn-ghost:hover { border-color: rgba(59, 130, 246, 0.6); background: rgba(59, 130, 246, 0.08); }
.btn-primary .arr, .btn-ghost .arr, .row-link .arr { transition: transform .25s ease; }
.btn-primary:hover .arr, .btn-ghost:hover .arr { transform: translateX(4px); }
.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  color: var(--muted); font-size: 1.4rem;
  animation: hint-bob 2.2s ease-in-out infinite;
}
@keyframes hint-bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* hero glow behind title */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(46% 38% at 50% 32%, rgba(59, 130, 246, 0.16), transparent 70%),
    radial-gradient(30% 24% at 62% 46%, rgba(34, 211, 238, 0.07), transparent 70%);
  pointer-events: none;
}

/* ---------- marquee ---------- */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
  padding: 18px 0;
  background: rgba(148, 163, 184, 0.03);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee .track {
  display: inline-block;
  animation: marquee-scroll 32s linear infinite;
}
.marquee span {
  font-family: var(--display);
  font-size: 0.95rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin: 0 28px;
}
.marquee span.bin { color: rgba(59, 130, 246, 0.55); letter-spacing: 0.35em; }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: 110px 0; }
.section-head { margin-bottom: 56px; }
.section-eyebrow {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 14px; display: flex; align-items: center; gap: 12px;
}
.section-eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--blue); }
.section-title {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
}
.section-intro { color: var(--muted); margin-top: 16px; max-width: 560px; font-size: 1.05rem; }

/* ---------- service rows ---------- */
.service-rows { border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: 90px 1.1fr 1.3fr auto;
  gap: 28px; align-items: center;
  padding: 44px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  position: relative;
  transition: background .3s ease, padding-left .3s ease;
}
.service-row:hover { background: rgba(59, 130, 246, 0.045); padding-left: 26px; }
.service-row .num {
  font-family: var(--display);
  font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0.1em;
}
.service-row .row-title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.1;
  transition: color .2s ease;
}
.service-row:hover .row-title {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.service-row .row-desc { color: var(--muted); font-size: 0.98rem; max-width: 46ch; }
.row-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); font-weight: 600; font-size: 0.9rem; white-space: nowrap;
  transition: color .2s ease;
}
.service-row:hover .row-link { color: var(--blue); }
.service-row:hover .row-link .arr { transform: translateX(6px); }

/* ---------- platform bento cards ---------- */
.bento { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.glow-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--panel);
  padding: 36px 32px;
  color: var(--ink);
  transition: border-color .3s ease, transform .3s ease;
}
.glow-card:hover { border-color: rgba(59, 130, 246, 0.45); transform: translateY(-4px); }
.glow-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(59, 130, 246, 0.14), transparent 65%);
  opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.glow-card:hover::before { opacity: 1; }
.glow-card .icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin-bottom: 22px;
  border-radius: 14px; color: var(--blue);
  background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.25);
}
.glow-card .icon svg { width: 27px; height: 27px; }
.glow-card h3 {
  font-family: var(--display);
  font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px;
}
.glow-card p { color: var(--muted); font-size: 0.96rem; }
.glow-card .card-more {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 22px; color: var(--blue); font-weight: 600; font-size: 0.9rem;
}
.glow-card:hover .card-more .arr { transform: translateX(5px); }
.card-more .arr { transition: transform .25s ease; }

/* ---------- big CTA ---------- */
.big-cta {
  position: relative; text-align: center;
  padding: 150px 28px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.big-cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(52% 65% at 50% 100%, rgba(59, 130, 246, 0.17), transparent 70%);
}
.big-cta h2 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.05;
}
.big-cta p { color: var(--muted); margin: 22px auto 0; max-width: 520px; font-size: 1.08rem; }
.big-cta .hero-actions { margin-top: 40px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: rgba(148, 163, 184, 0.02); }
.footer-grid {
  max-width: var(--container); margin: 0 auto; padding: 70px 28px 50px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px;
}
.footer-brand .wordmark { font-size: 1.5rem; }
.footer-brand p { color: var(--muted); font-size: 0.92rem; margin-top: 14px; max-width: 30ch; }
.site-footer h4 {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.site-footer ul a, .site-footer address { color: var(--ink); font-size: 0.93rem; font-style: normal; }
.site-footer ul a { opacity: 0.85; transition: opacity .2s ease, color .2s ease; }
.site-footer ul a:hover { opacity: 1; color: var(--blue); }
.site-footer address { color: var(--muted); line-height: 1.8; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 22px 28px;
  text-align: center; color: var(--muted); font-size: 0.83rem;
}

/* ---------- reveal on scroll ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s cubic-bezier(.22,.6,.2,1), transform .8s cubic-bezier(.22,.6,.2,1);
  transition-delay: var(--rd, 0s);
}
[data-reveal].revealed { opacity: 1; transform: none; }

/* ---------- inner pages ---------- */
.page { max-width: 720px; margin: 0 auto; padding: 170px 28px 90px; }
.page h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.08;
  margin-bottom: 28px;
}
.page-intro { font-size: 1.15rem; color: var(--ink); margin-bottom: 24px; line-height: 1.7; }
.page-body h2 {
  font-family: var(--display);
  font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em;
  margin: 34px 0 10px; color: var(--ink);
}
.page-body p, .page-body ul, .page-body ol { color: var(--muted); margin-bottom: 15px; }
.page-body ul, .page-body ol { padding-left: 22px; }
.page-body li { margin-bottom: 6px; }
.page-body strong { color: var(--ink); }
.page-cta { margin-top: 34px; }
.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px;
  background: var(--grad); color: #fff; font-weight: 600;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(59, 130, 246, 0.5); text-decoration: none; }
.contact-block {
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  padding: 34px 30px; margin-top: 26px; font-style: normal;
}
.contact-block p { margin-bottom: 6px; color: var(--ink); }
.contact-block .label {
  color: var(--muted); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.14em; margin: 20px 0 4px; font-weight: 600;
}
.contact-block .label:first-child { margin-top: 0; }

/* ---------- "bright" shine + sparkle ---------- */
.hero h1 .blue, .big-cta h2 .blue {
  position: relative; display: inline-block;
  background: linear-gradient(110deg,
    #3B82F6 0%, #3B82F6 38%,
    #b7d4ff 48%, #eaf3ff 50%, #b7d4ff 52%,
    #3B82F6 62%, #3B82F6 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: hero-shine 3.2s ease-in-out infinite;
}
@keyframes hero-shine {
  0%   { background-position: 125% 0; }
  55%  { background-position: -25% 0; }
  100% { background-position: -25% 0; }
}
.hero h1 .blue::before, .hero h1 .blue::after {
  content: "\2726";
  position: absolute;
  color: #dbe9ff; background: none;
  -webkit-background-clip: initial; background-clip: initial;
  text-shadow: 0 0 10px rgba(147, 197, 253, 0.9);
  opacity: 0;
  animation: hero-sparkle 3.2s ease-in-out infinite;
  pointer-events: none;
}
.hero h1 .blue::before { font-size: 0.35em; top: -0.12em; right: -0.28em; animation-delay: 0.9s; }
.hero h1 .blue::after  { font-size: 0.22em; bottom: 0.25em; left: -0.45em; animation-delay: 1.5s; }
@keyframes hero-sparkle {
  0%, 25%   { opacity: 0; transform: scale(0.2) rotate(0deg); }
  35%       { opacity: 1; transform: scale(1.15) rotate(25deg); }
  45%       { opacity: 0.85; transform: scale(0.9) rotate(45deg); }
  60%, 100% { opacity: 0; transform: scale(0.2) rotate(90deg); }
}

/* ---------- glass-fiber binary stream ---------- */
.fiber-bg {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; overflow: hidden;
}
.fiber-bg svg { width: 100%; height: 100%; position: relative; }
.fiber-bg canvas.smoke-gl { position: absolute; inset: 0; width: 100%; height: 100%; }
.fiber-lines use { stroke: rgba(59, 130, 246, 0.07); stroke-width: 1.2; }
.fiber-bits text {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.35em;
  animation: bit-glimmer 1.4s ease-in-out infinite;
}
.fiber-bits text:nth-of-type(2n)   { animation-duration: 1.1s; animation-delay: 0.3s; }
.fiber-bits text:nth-of-type(3n)   { animation-duration: 1.7s; animation-delay: 0.6s; }
.fiber-bits text:nth-of-type(3n+1) { animation-delay: 0.9s; }
.fiber-bits .t3 { fill: rgba(125, 170, 255, 0.10); }
.fiber-bits .t2 { fill: rgba(125, 170, 255, 0.24); }
.fiber-bits .t1 { fill: rgba(160, 196, 255, 0.48); }
.fiber-bits .head {
  fill: rgba(230, 240, 255, 0.95);
  text-shadow: 0 0 6px rgba(147, 197, 253, 1), 0 0 14px rgba(59, 130, 246, 0.8);
}
@keyframes bit-glimmer {
  0%, 100% { opacity: 1; }
  35%      { opacity: 0.55; }
  60%      { opacity: 0.85; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .service-row { grid-template-columns: 48px 1fr auto; }
  .service-row .row-desc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .site-nav a:not(.btn-cta) { display: none; }
  .section { padding: 80px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .service-row:hover { padding-left: 12px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1 .blue, .big-cta h2 .blue { animation: none; background: none; color: var(--blue); }
  .hero h1 .blue::before, .hero h1 .blue::after { display: none; }
  .fiber-bg { display: none; }
  .marquee .track { animation: none; }
  .scroll-hint, .eyebrow .dot { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
