/* Lunarmobiscuit: 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; }
.typology-action-sidebar label { display: block; margin: 0; }  /* theme gives labels a 5px bottom margin */
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 99px 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 + 99px); }
}

/* Home cover slider: owl-carousel replaced by a CSS cross-fade. 5 slides, 5s each like the old
   autoplay (25s cycle; 0.6s fade = 2.4%; each slide visible for 20% of the cycle). */
.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 25s infinite;
}
/* Delays are shifted 0.6s 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. */
.typology-cover-slider .typology-cover-item:nth-child(1) { animation-delay: -0.6s; }
.typology-cover-slider .typology-cover-item:nth-child(2) { animation-delay: 4.4s; }
.typology-cover-slider .typology-cover-item:nth-child(3) { animation-delay: 9.4s; }
.typology-cover-slider .typology-cover-item:nth-child(4) { animation-delay: 14.4s; }
.typology-cover-slider .typology-cover-item:nth-child(5) { animation-delay: 19.4s; }
@keyframes tcs-fade {
  0%    { opacity: 0; visibility: visible; }
  2.4%  { opacity: 1; visibility: visible; }
  20%   { opacity: 1; visibility: visible; }
  22.4% { 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;
   otherwise it showed the sidebar copy (.typology-responsive-menu, hidden by the theme's CSS). */
.typology-header .typology-main-navigation { opacity: 0; position: absolute; }
.typology-sidebar .typology-responsive-menu { display: block; }
@media (min-width: 801px) {
  .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; }

/* "Load More" is a plain link to the next page; the theme's loading dots only showed during AJAX. */
.typology-pagination .typology-loader { display: none; }

/* 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: " "; }
