/* ============================================================
   CleanByte Web Studio — Wave background + azul theme (v8.8)
   1) Fixed wave canvas layer (above .aurora, below content)
   2) Azul theme: navy background, blues brightened, dark cards.
      Scoped to html[data-cbx-wave="azul"] (set statically in
      index.html so there is no flash of the light theme).
   ============================================================ */

/* ---------- 1) wave layer ---------- */
#cbx-waves {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100lvh; /* large viewport: stays put when the mobile URL bar hides */
  z-index: -5;              /* above .aurora (-10), below all content */
  pointer-events: none;
  overflow: hidden;
}
#cbx-waves canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  /* light fade at the very top so the fixed header stays crisp */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, #000 14%);
          mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, #000 14%);
}

/* ---------- tagline ---------- */
.cbx-wave-tag { max-width: 28rem; }

/* ============================================================
   2) AZUL THEME
   ============================================================ */
html[data-cbx-wave="azul"] {
  --cbx-bg: #0b1c2c;
  --cbx-card: rgba(13, 30, 48, 0.78);
  --cbx-card-solid: #0e2135;
  --cbx-soft: #10263d;
  --cbx-line: rgba(148, 197, 253, 0.16);
  --cbx-accent-line: rgba(96, 165, 250, 0.32);
  --cbx-tint: rgba(37, 99, 235, 0.14);
}

html[data-cbx-wave="azul"] body {
  background-color: var(--cbx-bg);
  color: #ededed;
}
html[data-cbx-wave="azul"] .aurora { display: none; }

/* text scale -> light */
html[data-cbx-wave="azul"] .text-neutral-950,
html[data-cbx-wave="azul"] .text-neutral-900,
html[data-cbx-wave="azul"] .text-neutral-800 { color: #f5f5f5; }
html[data-cbx-wave="azul"] .text-neutral-700 { color: #d4d4d4; }
html[data-cbx-wave="azul"] .text-neutral-600 { color: #a3a3a3; }
html[data-cbx-wave="azul"] .text-neutral-500 { color: #8f8f8f; }
html[data-cbx-wave="azul"] .hover\:text-neutral-950:hover,
html[data-cbx-wave="azul"] .hover\:text-neutral-900:hover { color: #ffffff; }
html[data-cbx-wave="azul"] .fill-neutral-900 { fill: #f5f5f5; }

/* whites / cards -> dark navy cards */
html[data-cbx-wave="azul"] .bg-white { background-color: var(--cbx-card-solid); }
html[data-cbx-wave="azul"] .bg-white\/90,
html[data-cbx-wave="azul"] .bg-white\/85,
html[data-cbx-wave="azul"] .bg-white\/80,
html[data-cbx-wave="azul"] .bg-white\/70,
html[data-cbx-wave="azul"] .bg-white\/65,
html[data-cbx-wave="azul"] .bg-white\/60,
html[data-cbx-wave="azul"] .bg-white\/50 { background-color: var(--cbx-card); }
html[data-cbx-wave="azul"] .hover\:bg-white\/60:hover,
html[data-cbx-wave="azul"] .hover\:bg-white\/70:hover,
html[data-cbx-wave="azul"] .hover\:bg-white\/80:hover,
html[data-cbx-wave="azul"] .hover\:bg-neutral-100:hover { background-color: var(--cbx-soft); }
html[data-cbx-wave="azul"] .bg-neutral-100 { background-color: var(--cbx-soft); }
html[data-cbx-wave="azul"] .bg-neutral-200,
html[data-cbx-wave="azul"] .bg-neutral-200\/80,
html[data-cbx-wave="azul"] .bg-neutral-200\/90 { background-color: #16324e; }
html[data-cbx-wave="azul"] .bg-beige\/70,
html[data-cbx-wave="azul"] .bg-beige\/80 { background-color: var(--cbx-card); }
html[data-cbx-wave="azul"] .bg-blue-50\/70,
html[data-cbx-wave="azul"] .bg-blue-50\/80 { background-color: var(--cbx-tint); }

/* borders / rings */
html[data-cbx-wave="azul"] .border-neutral-200,
html[data-cbx-wave="azul"] .border-neutral-200\/70,
html[data-cbx-wave="azul"] .border-neutral-200\/80 { border-color: var(--cbx-line); }
html[data-cbx-wave="azul"] .border-blue-200,
html[data-cbx-wave="azul"] .border-blue-200\/80 { border-color: var(--cbx-accent-line); }
html[data-cbx-wave="azul"] .ring-neutral-900\/5,
html[data-cbx-wave="azul"] .ring-neutral-900\/10 { --tw-ring-color: rgba(255, 255, 255, 0.08); }
html[data-cbx-wave="azul"] .hover\:border-neutral-400:hover { border-color: rgba(255, 255, 255, 0.3); }

/* chips + glass */
html[data-cbx-wave="azul"] .chip {
  border-color: var(--cbx-line);
  background-color: rgba(13, 30, 48, 0.6);
  color: #d4d4d4;
}
html[data-cbx-wave="azul"] .glass {
  border-color: var(--cbx-line);
  background-color: var(--cbx-card);
  --tw-ring-color: rgba(255, 255, 255, 0.06);
}

/* form inputs */
html[data-cbx-wave="azul"] input.bg-white,
html[data-cbx-wave="azul"] textarea.bg-white,
html[data-cbx-wave="azul"] select.bg-white { background-color: var(--cbx-soft); color: #f5f5f5; }

/* blue accents brightened for navy bg */
html[data-cbx-wave="azul"] .text-blue-600 { color: #60a5fa; }
html[data-cbx-wave="azul"] .text-blue-700 { color: #7dd3fc; }
html[data-cbx-wave="azul"] .text-blue-900,
html[data-cbx-wave="azul"] .hover\:text-blue-900:hover { color: #bae6fd; }
/* gradients — order matters: from, then via, then ALL "to" rules last,
   so the gradient end color is never left transparent */
html[data-cbx-wave="azul"] .from-blue-700 { --tw-gradient-from: #38bdf8 var(--tw-gradient-from-position); --tw-gradient-to: rgba(56, 189, 248, 0) var(--tw-gradient-to-position); }
html[data-cbx-wave="azul"] .via-cyan-500 { --tw-gradient-to: rgba(34, 211, 238, 0) var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), #22d3ee var(--tw-gradient-via-position), var(--tw-gradient-to); }
html[data-cbx-wave="azul"] .to-cyan-500 { --tw-gradient-to: #06b6d4 var(--tw-gradient-to-position); }
html[data-cbx-wave="azul"] .to-cyan-400 { --tw-gradient-to: #22d3ee var(--tw-gradient-to-position); }
html[data-cbx-wave="azul"] .to-blue-700 { --tw-gradient-to: #38bdf8 var(--tw-gradient-to-position); }


/* ============================================================
   v8.7 — MOBILE READABILITY
   On small screens the wave field sits behind full-width text,
   so bare text blocks get a glass panel and the waves dim a bit.
   Desktop keeps the approved look.
   ============================================================ */
@media (max-width: 768px) {
  /* waves slightly dimmer under full-width text */
  #cbx-waves { opacity: 0.45; }

  /* hero text column */
  html[data-cbx-wave="azul"] section#top > div > div:first-child,
  /* section heading blocks (chip + h2 + intro paragraph) */
  html[data-cbx-wave="azul"] main section > div > .reveal:first-child,
  html[data-cbx-wave="azul"] main section > div > .cbx-reveal:first-child,
  /* footer */
  html[data-cbx-wave="azul"] footer > div {
    background: rgba(11, 28, 44, 0.66);
    border: 1px solid rgba(148, 197, 253, 0.14);
    border-radius: 1.25rem;
    padding: 1.25rem 1.1rem;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
}
