/* Site-wide base rules.
   These used to sit inside the header's styles (assets/css/header/header.css)
   although they apply to every page. They are loaded at the same point as
   before, just ahead of the header's styles, so nothing changes on screen.

   - Lists have no bullets or indent unless a section adds them back.
   - Nothing may make the page scroll sideways. */

ul, ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

html, body {
  overflow-x: hidden;
}

@supports (overflow-x: clip) {
  html, body {
    overflow-x: clip;
  }
}

/* Links to a place on a page (#contact-section, ...) stop below the fixed
   site header instead of under it. */
[id] {
  scroll-margin-top: 150px;
}

/* Scroll-in animations. Sections start these elements hidden (opacity 0,
   moved down) and a script reveals them. Without JavaScript, or when the
   animation cannot run (html.no-anim: the GSAP library did not load, or
   the visitor asked for reduced motion), they are simply shown. */
html:not(.js) .fade-up,
html:not(.js) .reveal,
html:not(.js) .scroll-animate,
html:not(.js) .scroll-hidden,
html:not(.js) .scroll-left,
html:not(.js) .scroll-right,
html:not(.js) .animate-on-scroll,
html.no-anim .fade-up {
  opacity: 1 !important;
  transform: none !important;
}

/* Start state of .fade-up elements (About, Contact, the enquiry form).
   assets/js/site/reveal.js fades them in and then removes the class, so
   the element's own :hover transforms work afterwards. This used to be
   repeated in three section stylesheets, and the About and Contact heroes
   relied on whichever of them happened to be loaded. */
html.js .fade-up {
  opacity: 0;
  transform: translateY(35px);
}
/* Home page whose first section is not the slider (hidden on the Home
   Page Layout page): start below the fixed header, whose bottom edge is
   at 142px on large screens, up to 173px on tablets and 118px on phones. */
main.home-no-slider {
  padding-top: 150px;
}

@media (max-width: 1023px) {
  main.home-no-slider {
    padding-top: 180px;
  }
}

@media (max-width: 480px) {
  main.home-no-slider {
    padding-top: 124px;
  }
}
/* Reduced motion: jumps instead of smooth scrolling (main.css asks for smooth). */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
}

/* Our Work cards start hidden until a script shows them: not without JavaScript. */
html:not(.js) #our-work-gallery .ow-card {
  opacity: 1 !important;
  transform: none !important;
}

/* Reduced motion, for the whole page: animations and transitions finish at
   once. Several section stylesheets used to carry this same block for
   everything on the page; their copies now only cover their own section. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
