/* The Angel Accelerator: CSS that replaces the Typology theme's JavaScript (main.js). */

/* Sidebar menu: opened by the hidden #typology-sidebar-toggle checkbox (hamburger is its label). */
.typology-action-sidebar label,
.typology-sidebar-close { cursor: pointer; }
body:has(#typology-sidebar-toggle:checked) { overflow: hidden; }
body:has(#typology-sidebar-toggle:checked) .typology-sidebar {
  transform: translate3d(0, 0, 0);
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.5);
}
body:has(#typology-sidebar-toggle:checked) .typology-sidebar-overlay { opacity: 1; visibility: visible; }

/* Cover height: main.js set it to the window height, plus the 72px the first section overlaps
   above 680px wide (below that the theme drops the overlap). */
.typology-cover:not(.typology-cover-empty) { height: 100vh; min-height: 450px; }
@media (min-width: 681px) {
  .typology-cover:not(.typology-cover-empty) { height: calc(100vh + 72px); }
}

/* Home cover slider: owl-carousel replaced by a CSS cross-fade, 4s per slide like the old autoplay. */
.typology-cover-slider {
  position: relative;
  height: 100%;
  max-height: none;
  overflow: hidden;
}
.typology-cover-slider .typology-cover-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  animation: tcs-fade 12s infinite;
}
/* Delays are shifted 0.6s (the 5% fade-in) earlier so slide 1 is fully visible on first paint
   and each later slide fades in while the previous one fades out. No pause on hover (the live
   slider did not pause, and the cover fills the screen, so the mouse is usually over it). */
.typology-cover-slider .typology-cover-item:nth-child(1) { animation-delay: -0.6s; }
.typology-cover-slider .typology-cover-item:nth-child(2) { animation-delay: 3.4s; }
.typology-cover-slider .typology-cover-item:nth-child(3) { animation-delay: 7.4s; }
@keyframes tcs-fade {
  0%   { opacity: 0; visibility: visible; }
  5%   { opacity: 1; visibility: visible; }
  33%  { opacity: 1; visibility: visible; }
  38%  { opacity: 0; visibility: hidden; }
  100% { opacity: 0; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .typology-cover-slider .typology-cover-item { animation: none; }
  .typology-cover-slider .typology-cover-item:first-child { opacity: 1; visibility: visible; }
}

/* Top navigation: main.js showed it (and hid the sidebar copy) only when it fit beside the logo. */
.typology-header .typology-main-navigation { opacity: 0; position: absolute; }
@media (min-width: 820px) {
  .typology-header .typology-main-navigation { opacity: 1; position: relative; }
  .typology-sidebar .typology-responsive-menu { display: none; }
}

/* Header: main.js turned the fixed header into a sticky white bar after scrolling past the cover.
   Without JS the header simply scrolls away with the page. */
.typology-header { position: absolute; }

/* Contact form: the one Contact Form 7 rule the form's layout needs (its stylesheet is dropped). */
.wpcf7-list-item { display: inline-block; margin: 0 0 0 1em; }
.wpcf7-list-item-label::before { content: " "; }
