/* DTK enhancements: performance, focus, conversion CTA, reveal motion */

/* ---------- Rendering performance ---------- */
/* Skip layout/paint for off-screen sections until they scroll near the viewport.
   contain-intrinsic-size keeps the scrollbar stable. */
.dtk-cv {
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}

/* ---------- Focus visibility (WCAG 2.4.7 / 2.4.11) ---------- */
a:focus-visible,
button:focus-visible,
[role="menuitem"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #C0392B;
  outline-offset: 3px;
  border-radius: 6px;
}
[data-theme="dark"] a:focus-visible,
[data-theme="dark"] button:focus-visible {
  outline-color: #ff8b7a;
}

/* Skip link */
/* RTL layouts: keep off-canvas menus from creating a horizontal scrollbar */
html[dir="rtl"] body {
  overflow-x: clip;
}

.dtk-skip {
  position: fixed;
  inset-inline-start: 0;
  top: 0;
  transform: translateY(-200%);
  z-index: 2000;
  background: #C0392B;
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 10px 0;
  font-weight: 700;
  text-decoration: none;
}
.dtk-skip:focus {
  transform: none;
}

/* ---------- Scroll reveal ---------- */
.dtk-reveal {
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
}
.dtk-reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.3, 1),
    transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
@media (prefers-reduced-motion: reduce) {
  .dtk-reveal,
  .dtk-reveal.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
html.a11y-pause .dtk-reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* ---------- Sticky conversion bar ---------- */
.dtk-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.9rem calc(0.65rem + env(safe-area-inset-bottom));
  background: rgba(17, 17, 19, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.dtk-cta.is-on {
  transform: none;
}
.dtk-cta__text {
  flex: 1 1 auto;
  min-width: 0;
  color: #fff;
  font-size: 0.86rem;
  line-height: 1.25;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dtk-cta__text small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  opacity: 0.75;
}
.dtk-cta__btn {
  flex: 0 0 auto;
  background: #C0392B;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.62rem 1.05rem;
  border-radius: 10px;
  white-space: nowrap;
}
.dtk-cta__btn:hover {
  background: #a83226;
}
.dtk-cta__close {
  flex: 0 0 auto;
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.35rem;
  cursor: pointer;
}
.dtk-cta__close:hover {
  color: #fff;
}
@media (prefers-reduced-motion: reduce) {
  .dtk-cta {
    transition: none;
  }
}
/* Keep floating widgets clear of the bar while it is visible */
body.dtk-cta-on .a11y-fab,
body.dtk-cta-on .sh-fab {
  transform: translateY(-78px);
  transition: transform 0.35s ease;
}
@media (min-width: 1024px) {
  .dtk-cta {
    left: auto;
    right: 5.75rem;
    bottom: 1.25rem;
    max-width: 26rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.7rem 0.9rem;
  }
  body.dtk-cta-on .a11y-fab,
  body.dtk-cta-on .sh-fab {
    transform: none;
  }
}

/* ---------- Header lockup: stop the wordmark wrapping on narrow phones ---------- */
.site-header .logo-text {
  white-space: nowrap;
}
@media (max-width: 430px) {
  .site-header .logo-text {
    font-size: 0.95rem;
    letter-spacing: 0.01em;
  }
  .site-header .logo svg {
    width: 30px;
    height: 30px;
  }
}
