/**
 * Minimal section change markers — subtle top seam per section.
 */

:root {
  --section-change-line-height: 1px;
  --section-change-line-width: min(140px, 32vw);
  --section-change-glow-height: 16px;
  --section-change-padding-y: clamp(16px, 2.8vw, 26px);
  --section-change-accent: var(--color-red, #de242f);
  --section-change-soft: rgba(222, 36, 47, 0.18);
  --section-change-glow: rgba(222, 36, 47, 0.16);
  --section-flow-line-width: 100%;
  --section-flow-accent: var(--color-red, #de242f);
  --section-flow-glow: rgba(222, 36, 47, 0.28);
}

body.site-flow-active:not(.dashboard-app-body) .site-section-block {
  position: relative;
  scroll-margin-top: calc(var(--header-height, 72px) + 12px);
}

/* Legacy per-section top line — disabled on homepage (uses .site-section-divider) */
html body.home.site-flow-active:not(.dashboard-app-body) .site-section-block:not(#hero)::before {
  display: none !important;
  content: none !important;
}

/* Minimal centered marker at top of each section (except hero) — inner pages only */
body.site-flow-active:not(.dashboard-app-body):not(.home) .site-section-block:not(#hero)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  width: var(--section-change-line-width);
  height: var(--section-change-line-height, 1px);
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--section-change-soft) 18%,
    var(--section-change-accent) 50%,
    var(--section-change-soft) 82%,
    transparent 100%
  );
  box-shadow: 0 0 10px var(--section-change-glow);
  transform: translateX(-50%) scaleX(0.35);
  transform-origin: center;
  opacity: 0.22;
  transition:
    opacity 0.55s ease,
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.55s ease;
  pointer-events: none;
}

body.site-flow-active:not(.dashboard-app-body):not(.home) .site-section-block:not(#hero).is-section-visible::before {
  opacity: 0.72;
  transform: translateX(-50%) scaleX(1);
  box-shadow:
    0 0 8px var(--section-flow-glow),
    0 0 20px rgba(222, 36, 47, 0.1);
}

@media (max-width: 760px) {
  :root {
    --section-change-line-width: min(96px, 38vw);
    --section-change-glow-height: 12px;
    --section-change-padding-y: clamp(12px, 3vw, 18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.site-flow-active:not(.dashboard-app-body):not(.home) .site-section-block::before {
    transition: none;
  }
}
