/* Accessibility additions for hachem.com.au (Stage 2).
   Loaded after the main stylesheet. Nothing here changes the default look for
   mouse users: focus styles use :focus-visible, the skip link is off screen until
   focused, and the motion rules apply only with prefers-reduced-motion or after
   the keyboard-only pause control is used. */

/* Skip link and pause control: invisible until focused */
.skip-link{position:fixed;top:-100px;left:10px;z-index:10001;margin:0;padding:10px 16px;border:0;border-radius:0;
  background:#000;color:#fff;font:400 14px/1.2 HelveticaNeue,sans-serif;text-decoration:none;cursor:pointer}
.skip-link:focus{top:10px;color:#fff}
.skip-link:hover{color:#fff}
.skip-link.pause-motion{left:210px}

/* Keyboard focus ring: two-tone so it shows on cream, white and photos.
   !important is needed to beat a:focus{outline:0}, the Swiper arrow rules and
   the inline styles written by plugins. */
a:focus-visible,button:focus-visible,[role="button"]:focus-visible,[tabindex]:focus-visible,
.swiper-button-next:focus-visible,.swiper-button-prev:focus-visible,
html:not(.a11y-pointer) select:focus-visible,html:not(.a11y-pointer) input:focus-visible,
html:not(.a11y-pointer) textarea:focus-visible{
  outline:2px solid #1a1a1a!important;outline-offset:2px;box-shadow:0 0 0 5px #fff!important}
/* (a11y.js adds html.a11y-pointer while the mouse or touch is in use, so clicking
   into a text field looks as it always did. Without the script the ring always shows.) */
main[tabindex="-1"]:focus-visible,.opportunity[tabindex="-1"]:focus-visible{
  outline:0!important;box-shadow:none!important}

/* The fixed header must not cover a focused item */
html{scroll-padding-top:110px}
@media (max-width:768px){html{scroll-padding-top:70px}}

/* Closed mobile menu is not reachable by Tab. The nav's existing transition is
   repeated with one addition: visibility flips at once when opening and only
   after the slide-out (.3s) when closing, so the slide animation is unchanged. */
@media (max-width:768px){
  header nav{transition:all .3s ease,transform .5s ease,opacity .5s ease,visibility 0s linear 0s}
  header:not(.open) nav{visibility:hidden;
    transition:all .3s ease,transform .5s ease,opacity .5s ease,visibility 0s linear .3s}
}

/* Project titles show on keyboard focus, as they do on mouse hover */
.grid .grid-item a:focus-visible .project-details-container{left:0!important;top:0!important}

/* Resume field: reachable by keyboard, same look. The label still opens the file
   dialog on click; the ring is drawn on the label when the input has focus. */
.careers-forms .form-container form .file-upload input[type=file]{
  display:block;position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;opacity:0;
  overflow:hidden;clip:rect(0,0,0,0)}
.careers-forms .form-container form .file-upload .file-label:focus-within{
  outline:2px solid #1a1a1a;outline-offset:2px;box-shadow:0 0 0 5px #fff}

/* Long staff names may wrap on small screens (reflow) */
@media (max-width:500px){.staff-container .staff{white-space:normal!important}}

/* Project name as the page H1: identical to the old h2.brand rules in
   a5ab9f8b, 0204b1af and 4aa42046 .main.css (the h2 base rule plus the brand
   rules, merged), so the look does not change. */
main .main-project .project-container .project-heading-container h1.brand{
  max-width:300px;font-family:Calson,sans-serif;font-size:5.3em;font-weight:400;color:#9c9c9c;
  text-align:center;margin:0 auto 75px;line-height:.7em}
main .main-project .project-container .project-heading-container h1.brand.smaller{font-size:4.5em}
main .main-project .project-container .project-heading-container h1.brand.smallest{font-size:4em}
main .main-project .project-container .project-heading-container h1.brand span{
  font-family:HelveticaNeue,sans-serif;font-size:.25em;letter-spacing:1px}

/* Reduced motion: no change for users without the OS setting */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition-duration:.01ms!important;
    transition-delay:0s!important;scroll-behavior:auto!important}
  [data-scroll-speed]{transform:none!important}
}

/* Keyboard-only "Pause moving content" control: stops CSS loops too */
html.a11y-paused *,html.a11y-paused *::before,html.a11y-paused *::after{animation-play-state:paused!important}

/* Images with their real width and height attributes (set by tools/stage2/apply.py
   when images_ready is on) reserve their space before they load, so the page does not
   jump and the scroll-reveal positions stay right with lazy loading. The CSS widths
   already on these images win over the attribute; height must follow the width.
   Selected by sizes so the home page's original width and height attributes keep
   behaving as they always have. */
main img[sizes]{height:auto}

/* Heading order: these elements changed tag, the look did not. Copies of the theme's
   rules for #hero .swiper-slide h3, the footer h4 and project-text-container h2. */
#hero .hero-slider .swiper-slide .hero-eyebrow{position:relative;z-index:2;width:100%;transition:all .4s ease;
  opacity:0;transform:translateY(50px);font-family:Calson,sans-serif;font-size:3em;line-height:.9em;font-weight:400;
  color:#fff;text-align:center;text-shadow:0 0 40px rgba(0,0,0,.6);padding:0 20px;margin:-80px 0 10px}
@media all and (max-width:991px){#hero .hero-slider .swiper-slide .hero-eyebrow{font-size:2.5em}}
@media all and (max-width:768px){#hero .hero-slider .swiper-slide .hero-eyebrow{font-size:1.5em}}
#hero .hero-slider .swiper-slide .hero-eyebrow.animate{opacity:1;transform:translateY(0)}
#hero .hero-slider .swiper-slide .hero-eyebrow.fade-out{opacity:0}
footer .footer-container .footer-address h3,footer .footer-container .footer-contact h3{
  font-size:1.2em;text-transform:uppercase;color:#80807b;letter-spacing:1.5px;margin:0 0 5px}
/* Fusion House loads an older stylesheet with a larger gap */
html:has(link[href*="0204b1af"]) footer .footer-container .footer-address h3,
html:has(link[href*="0204b1af"]) footer .footer-container .footer-contact h3{margin-bottom:10px}
main .main-project .project-container .project-text-container h3.section-label{
  font-family:Calson,sans-serif;font-size:2em;font-weight:400;color:#605f5b;text-align:left;margin:0 0 20px}

/* width and height added by the build: the browser reserves the space, the theme's
   CSS still sizes the image. :where keeps this below every theme rule. */
:where(img[data-natural]){height:auto}

/* Home tiles: the theme's .grid-item>img, now that the image sits in a picture */
.grid .grid-item>picture>img{width:100%;height:auto;visibility:hidden}

/* Cade and Bird home tiles: a 2:1 photo in a taller tile */
.grid .grid-item a img[width="1200"][height="600"]{object-fit:cover}
