@import url("product-title-images.css");

/* ============================================
   SindByte Shared Styles — Scroll animations,
   glow effects, accordion, utilities
   ============================================ */

/* --- Scroll Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease-out, transform 0.65s ease-out;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* --- Glow Hover Effects --- */
.glow-hover {
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.glow-hover:hover {
  box-shadow: 0 0 24px rgba(0, 243, 255, 0.22);
  border-color: rgba(0, 243, 255, 0.55) !important;
  transform: translateY(-3px);
}
.glow-gold:hover {
  box-shadow: 0 0 24px rgba(255, 181, 31, 0.22);
  border-color: rgba(255, 181, 31, 0.55) !important;
}
.glow-purple:hover {
  box-shadow: 0 0 24px rgba(188, 19, 254, 0.22);
  border-color: rgba(188, 19, 254, 0.55) !important;
}

/* --- Gradient Border Animation --- */
@keyframes borderRotate {
  from { --angle: 0deg; }
  to   { --angle: 360deg; }
}
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.gradient-border {
  position: relative;
  background: rgba(12, 20, 34, 0.9);
  border-radius: 14px;
}
.gradient-border::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background: conic-gradient(from var(--angle), #00f3ff, #bc13fe, #ffb51f, #00f3ff);
  animation: borderRotate 6s linear infinite;
  z-index: -1;
  opacity: 0.6;
}

/* --- Accordion Styles --- */
.sb-accordion .accordion-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.sb-accordion .accordion-button {
  background: transparent;
  color: #e9edf7;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  padding: 16px 20px;
  box-shadow: none;
}
.sb-accordion .accordion-button:not(.collapsed) {
  color: #00f3ff;
  background: rgba(0, 243, 255, 0.05);
  box-shadow: none;
}
.sb-accordion .accordion-button::after {
  filter: invert(1);
  transition: transform 0.3s ease;
}
.sb-accordion .accordion-button:not(.collapsed)::after {
  transform: rotate(180deg);
}
.sb-accordion .accordion-body {
  color: #9fb1c8;
  padding: 0 20px 18px;
  line-height: 1.7;
}
.sb-accordion .accordion-body code {
  color: #00f3ff;
  background: rgba(0, 243, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

/* --- Feature Highlight Cards --- */
.feature-highlight {
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.05) 0%, rgba(188, 19, 254, 0.05) 100%);
  border: 1px solid rgba(0, 243, 255, 0.18);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.feature-highlight::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(0, 243, 255, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

/* --- Terminal Typewriter Cursor --- */
.typewriter-cursor::after {
  content: '▋';
  color: #00f3ff;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* --- Image Hover Zoom --- */
.img-zoom {
  overflow: hidden;
  border-radius: 12px;
}
.img-zoom img {
  transition: transform 0.5s ease;
  width: 100%;
  display: block;
}
.img-zoom:hover img {
  transform: scale(1.04);
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #00f3ff, #bc13fe, #ffb51f);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 243, 255, 0.1);
  border: 1px solid rgba(0, 243, 255, 0.4);
  color: #00f3ff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background 0.2s;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background: rgba(0, 243, 255, 0.25);
}

/* --- Prefers Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .gradient-border::before {
    animation: none !important;
  }
  .typewriter-cursor::after {
    animation: none !important;
  }
}

/* --- Lazy Load Fade --- */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease;
}
img[loading="lazy"].loaded {
  opacity: 1;
}

/* --- Utility Classes --- */
.text-gradient {
  background: linear-gradient(90deg, #00f3ff, #bc13fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.border-glow {
  box-shadow: 0 0 14px rgba(0, 243, 255, 0.12);
}
.bg-glass {
  background: rgba(12, 20, 34, 0.86);
  backdrop-filter: blur(10px);
}

/* --- Download History Charts --- */
.download-chart {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(0, 243, 255, 0.2);
  border-radius: 10px;
  background: rgba(3, 12, 22, 0.38);
}
.download-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted, #9fb1c8);
  font-size: 0.82rem;
}
.download-chart-head strong {
  color: var(--gold, #ffb51f);
  font-weight: 700;
}
.download-chart-bars {
  display: grid;
  grid-template-columns: repeat(31, minmax(4px, 1fr));
  align-items: end;
  gap: 3px;
  min-height: 58px;
}
.download-chart-bar {
  display: flex;
  min-width: 0;
  height: 58px;
  align-items: end;
  justify-content: center;
  position: relative;
}
.download-chart-bar i {
  display: block;
  width: 100%;
  max-width: 12px;
  height: var(--bar-height, 2px);
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #ffb51f 0%, #00f3ff 100%);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.18);
}
.download-chart-bar.is-inactive i {
  opacity: 0.18;
}
.download-chart-bar b {
  position: absolute;
  top: 100%;
  margin-top: 4px;
  color: rgba(159, 177, 200, 0.72);
  font-size: 0.56rem;
  font-weight: 400;
}
.download-chart-empty {
  margin-top: 18px;
  color: var(--muted, #9fb1c8);
  font-size: 0.78rem;
}
.download-chart-months {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 18px;
  color: var(--muted, #9fb1c8);
  font-size: 0.76rem;
}
.download-chart-months strong {
  color: var(--cyan, #00f3ff);
}

/* --- Shared all-product download overview --- */
.download-overview {
  position: relative;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(0, 243, 255, 0.22);
  border-radius: 12px;
  background: rgba(3, 12, 22, 0.5);
  overflow: hidden;
}

/* The compiler pages use the same 3D scene behind the content. Give the
   download overview a matching instrument-panel depth without changing the
   chart data or its accessible text representation. */
html.sb3d .download-overview {
  perspective: 1400px;
  transform-style: preserve-3d;
  border-color: rgba(0, 243, 255, 0.34);
  background:
    linear-gradient(rgba(2, 8, 16, 0.78), rgba(2, 8, 16, 0.78)),
    repeating-linear-gradient(0deg, rgba(0, 243, 255, 0.035) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(188, 19, 254, 0.025) 0 1px, transparent 1px 52px);
  box-shadow:
    0 0 0 1px rgba(188, 19, 254, 0.08),
    0 18px 42px rgba(0, 0, 0, 0.32),
    inset 0 0 34px rgba(0, 243, 255, 0.06);
  transition: transform 0.28s ease-out, border-color 0.28s ease, box-shadow 0.28s ease;
  will-change: transform;
}
html.sb3d .download-overview::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 0;
  border: 1px solid rgba(0, 243, 255, 0.12);
  border-radius: 8px;
  box-shadow: inset 0 0 22px rgba(188, 19, 254, 0.045);
  pointer-events: none;
}
html.sb3d .download-overview-canvas {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(0, 243, 255, 0.14);
  border-radius: 8px;
  background: rgba(3, 12, 22, 0.58);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.22), 0 0 16px rgba(0, 243, 255, 0.05);
  transform: translateZ(5px);
}
html.sb3d .download-overview-group,
html.sb3d .download-overview-legend,
html.sb3d .download-overview-note {
  position: relative;
  z-index: 1;
  transform: translateZ(4px);
}
html.sb3d .download-overview-chip {
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, background 0.18s ease-out;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}
html.sb3d .download-overview-chip:hover {
  transform: translateY(-2px) rotateX(3deg);
  background: rgba(2, 8, 16, 0.92);
  box-shadow: 0 6px 16px rgba(0, 243, 255, 0.12);
}
html.sb3d .download-overview.sb3d-graph-hover {
  border-color: rgba(0, 243, 255, 0.5);
  box-shadow:
    0 0 0 1px rgba(188, 19, 254, 0.12),
    0 22px 48px rgba(0, 0, 0, 0.38),
    inset 0 0 38px rgba(0, 243, 255, 0.08);
}
html.sb3d .download-overview[data-download-overview] {
  transform: perspective(1400px) rotateX(var(--graph-rx, 0deg)) rotateY(var(--graph-ry, 0deg));
}
.download-release-marker {
  position: absolute;
  z-index: 3;
  width: 0;
  border-left: 2px dashed var(--release-color, #ffb51f);
  filter: drop-shadow(0 0 4px var(--release-color, #ffb51f));
  pointer-events: none;
}
.download-release-marker-label {
  display: block;
  position: absolute;
  top: calc(-4px - var(--release-label-offset, 0px));
  left: var(--release-label-left, 0);
  transform: translate(0, -100%);
  box-sizing: border-box;
  inline-size: min(250px, calc(100vw - 80px));
  max-width: 250px;
  padding: 4px 8px;
  border: 1px solid var(--release-color, #ffb51f);
  border-radius: 6px;
  background: rgba(2, 8, 16, 0.94);
  color: var(--release-color, #ffb51f);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}
.download-overview-canvas {
  display: block;
  width: 100%;
  height: 440px;
}
.download-overview-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.download-overview-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid var(--series-color);
  border-radius: 7px;
  color: var(--series-color);
  background: rgba(2, 8, 16, 0.74);
  font-size: 0.78rem;
  line-height: 1.2;
}
.download-overview-chip i {
  width: 22px;
  height: 0;
  flex: 0 0 22px;
  border-top: 3px solid var(--series-color);
}
.download-overview-swatch.pattern-1 {
  border-top-style: dashed;
}
.download-overview-swatch.pattern-2 {
  border-top-style: dotted;
}
.download-overview-swatch.pattern-3 {
  height: 3px;
  border: 0;
  background: repeating-linear-gradient(to right, var(--series-color) 0 9px, transparent 9px 12px, var(--series-color) 12px 14px, transparent 14px 18px);
}
.download-overview-data {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.download-overview-note {
  margin-top: 10px;
  color: var(--muted, #9fb1c8);
  font-size: 0.78rem;
}
.download-overview-group {
  position: relative;
}
.download-overview-group + .download-overview-group {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 243, 255, 0.14);
}
.download-overview-title {
  margin: 0 0 10px;
  color: var(--cyan, #00f3ff);
  font-size: 0.95rem;
  font-weight: 700;
}
.download-overview-group[data-download-overview-group="extras"] .download-overview-title {
  color: var(--gold, #ffb51f);
}

@media (max-width: 575.98px) {
  .download-chart-bars {
    gap: 2px;
  }
  .download-chart-bar b {
    display: none;
  }
  .download-chart-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .download-overview {
    padding: 10px;
  }
  .download-overview-canvas {
    height: 290px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.sb3d .download-overview,
  html.sb3d .download-overview-canvas,
  html.sb3d .download-overview-chip {
    transform: none;
    transition: none;
  }
}

/* --- Bootstrap text-muted override for dark backgrounds --- */
.text-muted {
  color: var(--muted, #9fb1c8) !important;
}

/* --- Department Mascot Artwork --- */
.mascot-hero {
  display: block;
  width: 100%;
  height: clamp(220px, 34vw, 420px);
  margin: 0 0 22px;
  object-fit: contain;
  object-position: center;
  background: #050b16;
  border: 1px solid var(--line, rgba(0, 243, 255, 0.26));
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}
.mascot-card-image {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 16px;
  object-fit: contain;
  object-position: center;
  box-sizing: border-box;
  overflow: hidden;
  background: #050b16;
  border: 1px solid rgba(0, 243, 255, 0.22);
  border-radius: 10px;
}

@media (max-width: 767.98px) {
  .mascot-hero {
    height: 240px;
  }
}

.family-hero {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* ============================================
   Accessibility and robustness block (2026-10)
   KEEP IN SYNC with the same block at the end of
   sindbyte-3d.css: a page loads one or both files.
   (Only difference: the .text-muted rule lives in
   the shared.css section above; the 3d.css copy
   carries it inside its block.)
   ============================================ */

/* Images with width/height attributes keep their aspect ratio when CSS narrows them.
   Zero specificity: any class rule that sets a height (.brand-logo ...) still wins. */
:where(img[width][height]) {
  height: auto;
}

/* Visible keyboard focus (WCAG 2.4.7) in the site's accent colour */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan, #00f3ff);
  outline-offset: 2px;
}
/* targets of scripted focus (skip link, in-page anchors, main with tabindex="-1") get no ring */
:where([tabindex="-1"]):focus-visible {
  outline: none;
}
.btn:focus-visible,
.btn-main:focus-visible,
.btn-holo:focus-visible,
.navbar-toggler:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--cyan, #00f3ff);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0, 243, 255, 0.25);
}
.sb-accordion .accordion-button:focus-visible {
  outline: 2px solid var(--cyan, #00f3ff);
  outline-offset: -2px;
}
canvas:focus-visible {
  outline: 2px dashed var(--cyan, #00f3ff);
  outline-offset: -3px;
}

/* Skip link: a link with class "skip-link" and href "#main-content" as the first child of the
   body, plus id="main-content" on the main element. Invisible until it receives keyboard focus. */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10000;
  padding: 10px 16px;
  border: 2px solid var(--cyan, #00f3ff);
  border-radius: 8px;
  background: var(--bg, #060912);
  color: var(--cyan, #00f3ff);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-300%);
  transition: transform 0.15s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--gold, #ffb51f);
  outline-offset: 2px;
}

/* Brand purple (#bc13fe) stays for borders, glows and large display text. As small
   TEXT on the dark panels it measures only about 4.0:1, so these small-text uses
   (chips, tags, outline buttons) get a lighter purple (>= 5:1). The selectors are
   deliberately a little stronger than the page rules (.badge-chip.purple ...)
   but weaker than the hover rules, so hover states keep working. */
:root {
  --purple-text: #cc55ff;
}
a.btn-purple,
button.btn-purple,
.badge-chip.badge-chip.purple,
.history-badge.history-badge.purple,
.purple-tag.purple-tag {
  color: var(--purple-text);
}

/* .btn-alt: pages that style it paint border and text with var(--purple). The variable is
   re-pointed on the button itself, so only pages that really use .btn-alt that way change (a
   .btn-alt without a rule, next to .btn-main, keeps its cyan look). On hover the brand purple
   returns, so the white text keeps its contrast on the filled button. */
a.btn-alt,
button.btn-alt {
  --purple: var(--purple-text);
}
a.btn-alt:hover,
button.btn-alt:hover {
  --purple: inherit;
}

/* Footer links the page does not style fall back to Bootstrap's default blue (about 3.2:1 on
   the dark footer). Bootstrap draws that blue from these two variables; re-pointing them for
   the footer changes only links that still use the default, every rule of a page keeps winning
   (footer a { ... }, a { color: inherit } ...). */
footer {
  --bs-link-color-rgb: 0, 243, 255;
  --bs-link-hover-color-rgb: 255, 181, 31;
}

/* Decorative motion off for visitors who asked for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .skip-link,
  .back-to-top,
  .scroll-progress,
  img[loading="lazy"] {
    transition: none;
  }
  .glow-hover,
  .glow-hover:hover {
    transform: none;
    transition: none;
  }
  .img-zoom img,
  .img-zoom:hover img {
    transform: none;
    transition: none;
  }
}
