/* Shared theme styles — loaded on every page via <link>.
   Edit here to change animations / nav-glow / card-lift across the site. */

/* Nav "Get App" glow pill.
   `isolation: isolate` + `contain: paint` keeps the rotating ::before
   off the parent nav's backdrop-blur re-paint path. Without them the
   nav flickers on scroll (backdrop-filter + animated child = paint storm). */
.nav-glow {
  position: relative;
  padding: 3px 12px;
  border-radius: 9999px;
  overflow: hidden;
  isolation: isolate;
  contain: paint;
  transform: translateZ(0);
}
.nav-glow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  aspect-ratio: 1;
  background: conic-gradient(
    transparent 0deg,
    transparent 140deg,
    #e16731 160deg,
    #fbbf24 180deg,
    #e16731 200deg,
    transparent 220deg,
    transparent 360deg
  );
  transform: translate(-50%, -50%);
  animation: glow-spin 3s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
  z-index: -2;
}
.nav-glow::after {
  content: '';
  position: absolute;
  inset: 1.5px;
  border-radius: 9999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 245, 241, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 24px rgba(62, 38, 22, 0.08);
  z-index: -1;
}
html.dark .nav-glow::after {
  background: linear-gradient(180deg, rgba(22, 20, 18, 0.94), rgba(10, 10, 10, 0.86));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 10px 24px rgba(0, 0, 0, 0.34);
}
@keyframes glow-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Scroll-revealed fade-up */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fade-up.animate-in {
  opacity: 1;
  transform: translateY(0);
}
.fade-up.delay-1 { transition-delay: 0.1s; }
.fade-up.delay-2 { transition-delay: 0.2s; }
.fade-up.delay-3 { transition-delay: 0.3s; }
.fade-up.delay-4 { transition-delay: 0.4s; }
.fade-up.delay-5 { transition-delay: 0.5s; }

/* Hero mockup scale-in */
.hero-mockup {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hero-mockup.animate-in {
  opacity: 1;
  transform: scale(1);
}

/* Generic scale reveal */
.scale-reveal {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.scale-reveal.animate-in {
  opacity: 1;
  transform: scale(1);
}

/* Slide reveals */
.slide-left {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.slide-left.animate-in {
  opacity: 1;
  transform: translateX(0);
}
.slide-right {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.slide-right.animate-in {
  opacity: 1;
  transform: translateX(0);
}

/* Card hover lift */
.card-lift {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.3s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.42);
}
html.dark .card-lift {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.62),
    0 14px 36px rgba(78,48,29,0.10),
    0 0 0 1px rgba(225,103,49,0.08);
}
html.dark .card-lift:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 14px 36px rgba(0,0,0,0.42),
    0 0 0 1px rgba(225,103,49,0.14);
}

/* Accessibility: honor user's reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .nav-glow::before { animation: none !important; }
  .testimonial-track { animation: none !important; }
  .fade-up, .hero-mockup, .scale-reveal,
  .slide-left, .slide-right {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Feature screenshots — sharpen downscaling on hi-DPI displays.
   Pairs with capScreenshot() in main.js which sets max-width per image.
   Layered fallbacks: high-quality (Chromium 123+, Safari 17+),
   then -webkit-optimize-contrast (older WebKit), then auto. */
#features picture {
  display: block;
  margin-inline: auto;
  /* Subtle backdrop so smaller shots feel intentional, not orphaned. */
  background:
    radial-gradient(ellipse at top, rgba(225,103,49,0.04), transparent 70%),
    var(--surface, #ffffff);
}
html.dark #features picture {
  background:
    radial-gradient(ellipse at top, rgba(225,103,49,0.06), transparent 70%),
    #131210;
}
#features picture img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  display: block;
  width: 100%;
  height: auto;
  /* Hint the GPU to compositor the image on its own layer for crisper transforms. */
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Feature timeline (vertical line + accent dots).
   Anchors at 33.333% to align with the boundary between the 4-col text
   and 8-col screenshot in the features grid. */
.timeline-section {
  position: relative;
}
.timeline-section::before {
  content: '';
  position: absolute;
  left: 33.333%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #e8e4dc;
  transform: translateX(-50%);
  display: none;
}
@media (min-width: 768px) {
  .timeline-section::before { display: block; }
}
html.dark .timeline-section::before {
  background: #2a2824;
}
.timeline-dot {
  position: absolute;
  left: 33.333%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e16731;
  border: 2px solid white;
  z-index: 10;
  display: none;
}

/* Blog system */
.blog-index-page,
.blog-article-page {
  background:
    radial-gradient(circle at top, rgba(249, 115, 22, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(245, 245, 247, 0.6), rgba(255, 255, 255, 0) 24%),
    var(--surface, #ffffff);
}
html.dark .blog-index-page,
html.dark .blog-article-page {
  background:
    radial-gradient(circle at top, rgba(249, 115, 22, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(17, 17, 19, 0.86), rgba(10, 10, 10, 0) 26%),
    #0a0a0a;
}
.blog-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 1024px) {
  .blog-shell { padding: 0 2.5rem; }
}
.blog-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(225, 103, 49, 0.18);
  background: rgba(249, 115, 22, 0.08);
  color: #e16731;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
}
html.dark .blog-kicker {
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.26);
}
.blog-featured {
  display: grid;
  gap: 1.5rem;
  border: 1px solid #e5e5e7;
  border-radius: 1.75rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(32, 24, 20, 0.06);
}
html.dark .blog-featured {
  border-color: #2a2a2e;
  background: rgba(17, 17, 19, 0.92);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
@media (min-width: 960px) {
  .blog-featured {
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    align-items: center;
    padding: 1.5rem;
  }
}
.blog-cover {
  position: relative;
  overflow: hidden;
  border-radius: 1.3rem;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.16), transparent 34%),
    #f5f5f7;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(229, 229, 231, 0.92);
}
html.dark .blog-cover {
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 34%),
    #111113;
  border-color: rgba(42, 42, 46, 0.92);
}
.blog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.85rem;
  color: #6e6e73;
}
html.dark .blog-meta-row { color: #86868b; }
.blog-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: rgba(249, 115, 22, 0.1);
  color: #e16731;
}
html.dark .blog-tag {
  background: rgba(249, 115, 22, 0.15);
}
.blog-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 760px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #e5e5e7;
  border-radius: 1.5rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(32, 24, 20, 0.05);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
html.dark .blog-card {
  border-color: #2a2a2e;
  background: rgba(17, 17, 19, 0.94);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
}
.blog-card:hover {
  transform: translateY(-3px);
  border-color: rgba(225, 103, 49, 0.24);
  box-shadow: 0 18px 40px rgba(32, 24, 20, 0.09);
}
html.dark .blog-card:hover {
  border-color: rgba(249, 115, 22, 0.24);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.32);
}
.blog-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.15rem 1.15rem 1.25rem;
}
.blog-card-title {
  font-size: 1.2rem;
  line-height: 1.35;
  font-weight: 700;
  color: #1d1d1f;
}
html.dark .blog-card-title { color: #f5f5f7; }
.blog-card-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #6e6e73;
  flex: 1;
}
html.dark .blog-card-desc { color: #86868b; }
.blog-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
}
.blog-author-mark {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 9999px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #e5e5e7;
  background: #ffffff;
}
html.dark .blog-author-mark {
  border-color: #2a2a2e;
  background: #111113;
}
.blog-author-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-author-label {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.blog-author-label strong {
  font-size: 0.9rem;
  color: #1d1d1f;
}
html.dark .blog-author-label strong { color: #f5f5f7; }
.blog-author-label span {
  font-size: 0.82rem;
  color: #6e6e73;
}
html.dark .blog-author-label span { color: #86868b; }

.blog-article {
  max-width: 860px;
}
.blog-article-header {
  position: relative;
  padding-bottom: 1.75rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid #e5e5e7;
}
html.dark .blog-article-header {
  border-bottom-color: #2a2a2e;
}
.blog-article-header::before {
  content: 'Rockxy Blog';
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(225, 103, 49, 0.18);
  background: rgba(249, 115, 22, 0.08);
  color: #e16731;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  margin-bottom: 1rem;
}
html.dark .blog-article-header::before {
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.26);
}
.blog-article-header > a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  border-radius: 9999px;
  padding: 0.55rem 0.95rem;
  border: 1px solid #e5e5e7;
  background: rgba(255, 255, 255, 0.9);
  color: #6e6e73;
  text-decoration: none;
}
html.dark .blog-article-header > a {
  border-color: #2a2a2e;
  background: rgba(17, 17, 19, 0.94);
  color: #86868b;
}
.blog-article-header > a:hover {
  color: #1d1d1f;
}
html.dark .blog-article-header > a:hover {
  color: #f5f5f7;
}
.blog-article-header h1 {
  font-size: clamp(2.35rem, 3.8vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: 0;
  max-width: 18ch;
  margin-bottom: 1rem;
}
@media (max-width: 640px) {
  .blog-article-header h1 {
    max-width: none;
  }
}
.blog-article-header time {
  font-variant-numeric: tabular-nums;
}
.blog-article-content {
  font-size: 1.08rem;
  line-height: 1.9;
}
.blog-article-content > * {
  max-width: none;
}
.blog-article-content h2 {
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.22;
  margin-top: 3rem;
  margin-bottom: 1rem;
}
.blog-article-content p,
.blog-article-content li {
  color: #343438;
}
html.dark .blog-article-content p,
html.dark .blog-article-content li {
  color: #dfdfe4;
}
.blog-article-content ul,
.blog-article-content ol {
  padding-left: 1.3rem;
}
.blog-article-content li + li {
  margin-top: 0.5rem;
}
.blog-article-content a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.blog-article-content code {
  font-size: 0.95em;
}
.blog-article-content p code,
.blog-article-content li code,
.blog-article-content figcaption code {
  border: 1px solid rgba(251, 191, 36, 0.18);
  background: rgba(249, 115, 22, 0.08);
  color: #c2410c;
  border-radius: 0.5rem;
  padding: 0.15rem 0.42rem;
  /* Long inline tokens (URLs, run IDs, headers) must wrap, not push the page
     wider than the viewport on small screens. */
  overflow-wrap: anywhere;
  word-break: break-word;
}
html.dark .blog-article-content p code,
html.dark .blog-article-content li code,
html.dark .blog-article-content figcaption code {
  border-color: rgba(251, 191, 36, 0.16);
  background: rgba(249, 115, 22, 0.12);
  color: #fdba74;
}
.blog-article-content pre {
  position: relative;
  border-radius: 1.2rem;
  border: 1px solid #d8dde6;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.96)),
    #f8fafc;
  padding: 1.1rem 1.15rem;
  overflow-x: auto;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 12px 28px rgba(15, 23, 34, 0.08);
}
html.dark .blog-article-content pre {
  border-color: #2b3442;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 30%),
    #111827;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 30px rgba(15, 23, 34, 0.18);
}
.blog-article-content pre code {
  display: block;
  min-width: max-content;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #1f2937;
}
html.dark .blog-article-content pre code {
  color: #e5eef8;
}
.blog-article-content pre code .code-token {
  font-weight: 500;
}
.blog-article-content pre code .token-comment {
  color: #6b7280;
  font-style: italic;
}
.blog-article-content pre code .token-string {
  color: #b45309;
}
.blog-article-content pre code .token-keyword {
  color: #7c3aed;
}
.blog-article-content pre code .token-type {
  color: #0f766e;
}
.blog-article-content pre code .token-number,
.blog-article-content pre code .token-constant {
  color: #be123c;
}
.blog-article-content pre code .token-function {
  color: #0369a1;
}
html.dark .blog-article-content pre code .token-comment {
  color: #8b98ab;
}
html.dark .blog-article-content pre code .token-string {
  color: #fbbf24;
}
html.dark .blog-article-content pre code .token-keyword {
  color: #c084fc;
}
html.dark .blog-article-content pre code .token-type {
  color: #5eead4;
}
html.dark .blog-article-content pre code .token-number,
html.dark .blog-article-content pre code .token-constant {
  color: #fb7185;
}
html.dark .blog-article-content pre code .token-function {
  color: #7dd3fc;
}
.blog-code-shell {
  position: relative;
  margin: 1.35rem 0;
}
.blog-code-shell pre {
  margin: 0;
}
.blog-code-shell pre.has-copy-button {
  padding-top: 3.6rem;
}
.blog-code-copy {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 9999px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  background: rgba(255, 255, 255, 0.9);
  color: #64748b;
  box-shadow: 0 10px 24px rgba(15, 23, 34, 0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.blog-code-copy:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(255, 255, 255, 0.98);
  color: #0f172a;
}
.blog-code-copy:focus-visible {
  outline: 2px solid rgba(249, 115, 22, 0.45);
  outline-offset: 2px;
}
.blog-code-copy svg {
  width: 1rem;
  height: 1rem;
  flex: none;
}
.blog-code-copy .copy-check {
  display: none;
}
.blog-code-copy.is-copied {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(220, 252, 231, 0.96);
  color: #15803d;
}
.blog-code-copy.is-copied .copy-icon {
  display: none;
}
.blog-code-copy.is-copied .copy-check {
  display: block;
}
html.dark .blog-code-copy {
  border-color: rgba(71, 85, 105, 0.72);
  background: rgba(17, 24, 39, 0.84);
  color: #c7d2fe;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}
html.dark .blog-code-copy:hover {
  background: rgba(17, 24, 39, 0.96);
  color: #f8fafc;
}
html.dark .blog-code-copy.is-copied {
  background: rgba(20, 83, 45, 0.82);
  color: #bbf7d0;
}
.blog-article-content figure,
.blog-article-content blockquote {
  margin: 2rem 0;
}
.blog-article-content blockquote {
  border-left: 3px solid #f97316;
  padding: 0.35rem 0 0.35rem 1rem;
  color: #4b4b50;
}
html.dark .blog-article-content blockquote {
  color: #d0d0d6;
}
@media (min-width: 768px) {
  .timeline-dot { display: block; }
}
html.dark .timeline-dot {
  border-color: #0a0a0a;
}

/* ───────────────────────────────────────────────────────────────────────
   Click-to-zoom feature screenshots.
   Hover shows a magnifier(+) cursor and a corner badge; clicking opens a
   near-fullscreen lightbox (wired in js/main.js).
   ─────────────────────────────────────────────────────────────────────── */
#features picture { position: relative; }
#features picture img,
.hero-zoomable { cursor: zoom-in; }
/* Discoverability badge — magnifier(+) icon, fades in on hover. */
#features picture::after,
.hero-zoomable::after {
  content: "";
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 20;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background-color: rgba(225, 103, 49, 0.85);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.15rem;
  pointer-events: none;
  /* Always visible + blinking pulse so users notice the image is zoomable. */
  animation: zoomBadgeBlink 1.8s ease-in-out infinite;
}
#features picture:hover::after,
.hero-zoomable:hover::after {
  /* On hover, settle to a solid, steady badge. */
  animation: none;
  opacity: 1;
  transform: scale(1.08);
  box-shadow: 0 0 0 4px rgba(225, 103, 49, 0.25);
}
@keyframes zoomBadgeBlink {
  0%, 100% {
    opacity: 0.55;
    transform: scale(0.94);
    box-shadow: 0 0 0 0 rgba(225, 103, 49, 0.45);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
    box-shadow: 0 0 0 7px rgba(225, 103, 49, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  #features picture::after,
  .hero-zoomable::after { animation: none; opacity: 0.85; }
}

/* Blog article images — same click-to-zoom lightbox as the landing page.
   Figures are real boxes (the picture is display:contents), so the magnifier
   badge attaches to the figure. Static (no blink) badge: a long article has
   many images, so a persistent always-visible icon is both discoverable on
   touch devices and easy on the battery (no dozens of simultaneous loops). */
.blog-article-content figure { position: relative; }
.blog-article-content figure img { cursor: zoom-in; }
.blog-article-content figure::after {
  content: "";
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 5;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background-color: rgba(225, 103, 49, 0.85);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.15rem;
  opacity: 0.7;
  transform: scale(0.95);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.blog-article-content figure:hover::after { opacity: 1; transform: scale(1.06); }

/* Lightbox overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(8, 8, 8, 0.9);
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lightbox-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-image {
  max-width: 95vw;
  max-height: 92vh;
  max-height: 92dvh; /* iOS/Android: exclude dynamic browser chrome */
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  transform: scale(0.96);
  transition: transform 0.25s ease;
  cursor: default;
}
.lightbox-overlay.open .lightbox-image { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.24); }

@media (prefers-reduced-motion: reduce) {
  .lightbox-overlay,
  .lightbox-image { transition: none; }
}

/* ───────────────────────────────────────────────────────────────────────
   Setup flow — "From first launch to first capture" 3-step sequence.
   Each step's number badge pulses (sáng sáng lên), and the connecting
   arrows shimmer in sequence, so light appears to flow left→right:
   step1 → arrow1 → step2 → arrow2 → step3 → loop.
   ─────────────────────────────────────────────────────────────────────── */
@keyframes setupGlowPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(225, 103, 49, 0);
    background-color: transparent;
  }
  50% {
    box-shadow: 0 0 18px 3px rgba(225, 103, 49, 0.45);
    background-color: rgba(225, 103, 49, 0.08);
  }
}
.setup-glow {
  animation: setupGlowPulse 2.7s ease-in-out infinite;
  will-change: box-shadow;
}
.setup-glow-1 { animation-delay: 0s; }
.setup-glow-2 { animation-delay: 0.9s; }
.setup-glow-3 { animation-delay: 1.8s; }

/* Long connector line between steps, with a light pulse that travels
   left→right along it (like data flowing through the setup sequence). */
.setup-flow-line {
  position: relative;
  overflow: hidden;
  background-color: rgba(225, 103, 49, 0.22);
}
.setup-flow-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, #e16731 50%, transparent 100%);
  transform: translateX(-110%);
  animation: setupLineFlow 2.7s ease-in-out infinite;
}
@keyframes setupLineFlow {
  0%        { transform: translateX(-110%); }
  55%, 100% { transform: translateX(110%); }
}
/* Arrowhead at the end of each connector pulses in sync with the line sweep. */
@keyframes setupArrowFlow {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}
.setup-flow-arrow svg {
  color: #e16731;
  animation: setupArrowFlow 2.7s ease-in-out infinite;
}
.setup-flow-arrow-1 .setup-flow-line::after,
.setup-flow-arrow-1 svg { animation-delay: 0.45s; }
.setup-flow-arrow-2 .setup-flow-line::after,
.setup-flow-arrow-2 svg { animation-delay: 1.35s; }

/* Workflow (4-step: Capture → Inspect → Modify → Replay) — same mechanics,
   delays spread evenly across the 2.7s cycle so light flows through all four. */
.wf-glow-1 { animation-delay: 0s; }
.wf-glow-2 { animation-delay: 0.6s; }
.wf-glow-3 { animation-delay: 1.2s; }
.wf-glow-4 { animation-delay: 1.8s; }
.wf-arrow-1 .setup-flow-line::after,
.wf-arrow-1 svg { animation-delay: 0.3s; }
.wf-arrow-2 .setup-flow-line::after,
.wf-arrow-2 svg { animation-delay: 0.9s; }
.wf-arrow-3 .setup-flow-line::after,
.wf-arrow-3 svg { animation-delay: 1.5s; }

@media (prefers-reduced-motion: reduce) {
  .setup-glow,
  .setup-flow-line::after,
  .setup-flow-arrow svg {
    animation: none !important;
  }
  /* Keep the connector + arrowhead fully visible when motion is disabled. */
  .setup-flow-arrow svg { opacity: 1; }
}
