/* Shared responsive layer. Loaded after each page's local styles. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
}

img,
video,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

iframe {
  max-width: 100%;
}

.header {
  font-size: clamp(2.25rem, 5vw, 3.125rem);
  line-height: 1.08;
}

.header2 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
}

.bodytext {
  font-size: clamp(1.05rem, 1.7vw, 1.375rem);
  line-height: 1.6;
}

/* Navigation */
#navbar ul {
  min-height: 110px;
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 1.5vw, 1.5rem);
  padding: 1rem clamp(1.25rem, 4vw, 3.125rem);
  overflow: visible;
}

#navbar li {
  float: none;
  display: block;
  padding: 0;
}

#navbar #logo {
  order: -1;
  margin: 0 auto 0 0;
}

#navbar #contact {
  margin-right: 0;
}

#navbar .navtext {
  padding-top: 0;
}

#navbar .navhover,
#navbar #logo a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.25rem;
}

#logoimg {
  display: block;
  width: clamp(3.5rem, 6vw, 4.375rem);
}

/* Footer */
#footer {
  width: 100%;
  min-height: 90px;
  height: auto;
  margin-top: 0;
  padding: 1.5rem clamp(1.25rem, 6vw, 6.25rem) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

#footer .alignleft,
#footer .alignright {
  float: none;
  margin: 0;
}

#footer #footertext {
  font-size: clamp(0.95rem, 1.5vw, 1.25rem);
}

/* Home */
.home-page #portrait {
  display: block;
  width: 100%;
}

.home-page #bio,
.home-page #experience {
  height: auto;
}

.home-page #biocontainer {
  width: min(100% - 2.5rem, 950px);
  padding: clamp(4rem, 8vw, 6.25rem) 0;
}

.home-page #biotitle,
.home-page #experiencetitle {
  margin-bottom: 1.5rem;
}

.home-page #experience {
  padding: 1rem 1.25rem clamp(4rem, 8vw, 7rem);
}

.home-page #experiencecontainer {
  width: min(100%, 1100px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 400px));
  justify-content: center;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.home-page #experiencetitle {
  grid-column: 1 / -1;
}

.home-page #experiencecontainer > a {
  display: block;
  min-width: 0;
}

.home-page .ex_box,
.home-page .blackoutbox {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border-radius: 1.25rem;
  box-shadow: 0 10px 30px rgb(40 103 135 / 10%);
  transition: background-color 180ms ease, transform 180ms ease;
}

.home-page .ex_box:hover,
.home-page .ex_box:focus-within {
  transform: translateY(-4px);
}

.home-page .ex_logo {
  max-width: 75%;
}

.home-page .overlaytext {
  font-size: clamp(1.25rem, 3vw, 1.875rem);
}

/* About */
.about-page #bigcontainer {
  width: min(92%, 1240px);
  height: auto;
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  align-items: start;
  gap: clamp(2rem, 6vw, 5rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.about-page #smallcontainer {
  width: auto;
  float: none;
  margin: 0;
}

.about-page #title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  padding-top: clamp(3rem, 8vw, 5rem);
}

.about-page #titletext {
  margin: clamp(2rem, 5vw, 3.125rem) 0 0;
}

.about-page #mephoto {
  width: 100%;
  float: none;
  margin: clamp(3rem, 7vw, 5rem) 0 0;
  border-radius: 1.25rem;
}

/* Case studies */
.case-study-page #bigcontainer {
  width: min(92%, 1200px);
  height: auto;
  min-height: clamp(380px, 42vw, 600px);
}

.case-study-page #smallcontainer {
  width: min(100%, 680px);
}

.case-study-page #title {
  padding-top: clamp(4rem, 10vw, 7.5rem);
  padding-bottom: 0;
  margin-bottom: 15px;
  font-size: clamp(2.75rem, 7vw, 3.75rem);
}

.case-study-page #titletext {
  font-size: clamp(1rem, 1.6vw, 1.125rem);
}

.case-study-page .fullcontainer {
  height: auto;
  min-height: 390px;
  padding: clamp(3rem, 8vw, 7.5rem) 0;
}

.case-study-page .smallcontainer2 {
  width: min(90%, 1080px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  background: transparent;
}

.case-study-page #one_c,
.case-study-page #two_c,
.case-study-page #three_c,
.case-study-page #four_c {
  width: auto;
  float: none;
  padding: 0;
}

.case-study-page #info,
.case-study-page #info_des {
  padding-top: 0;
}

.case-study-page #info_des {
  margin-top: 1rem;
}

.case-study-page #bodycontainer {
  width: 100%;
  height: auto;
  min-height: 0;
  padding: clamp(4rem, 8vw, 6.25rem) 0;
}

.case-study-page .bothcontainer {
  width: min(90%, 1080px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 4fr);
  gap: 2rem clamp(2rem, 5vw, 4rem);
}

.case-study-page .bothcontainer + .bothcontainer {
  margin-top: clamp(3rem, 7vw, 6rem);
}

.case-study-page .titlecontainer,
.case-study-page .contentcontainer {
  width: auto;
  float: none;
  min-width: 0;
}

.case-study-page .contentcontainer p:last-child {
  margin-bottom: 0;
}

.case-study-page .contentcontainer img,
.case-study-page .bodyphoto {
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.case-study-page .iframes {
  width: 100%;
  height: auto;
  min-height: 0;
  padding: clamp(1rem, 4vw, 3.125rem);
  border-radius: clamp(1rem, 4vw, 3.125rem);
  overflow: auto;
}

.case-study-page .embed-frame {
  padding: 0;
  margin: 1.5rem 0 clamp(2.5rem, 5vw, 4rem);
  background: transparent;
  border-radius: 0;
  overflow: hidden;
}

.case-study-page .embed-frame iframe {
  display: block;
  width: 100% !important;
  border-radius: 0.5rem;
}

.case-study-page .media-section {
  display: block;
  width: min(90%, 1080px);
}

.case-study-page .media-section > p {
  margin: 0;
}

.case-study-page .media-section > p + .embed-frame,
.case-study-page .media-section > .embed-frame + p {
  margin-top: 1.5rem;
}

.case-study-page .implementation-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-top: 2rem;
}

.case-study-page .implementation-gallery .bodyphoto {
  width: 100%;
  height: auto;
  margin: 0;
}

.case-study-page .implementation-gallery .implementation-wide {
  grid-column: 1 / -1;
}

.case-study-page iframe:not([src*="youtube.com/embed/XA5DZgZaI1Y"]) {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}

.case-study-page iframe[src*="youtube.com/embed/XA5DZgZaI1Y"] {
  width: min(100%, 270px);
  height: auto;
  aspect-ratio: 270 / 580;
}

.case-study-page #giveweb,
.case-study-page #jolapdf {
  min-height: min(70vh, 600px);
}

.case-study-page .spotify-embed iframe {
  height: auto;
  min-height: 232px;
  aspect-ratio: 2.25 / 1;
}

.case-study-page .website-embed iframe {
  height: 600px;
  min-height: 600px;
  aspect-ratio: auto;
}

.case-study-page .give-media-section .media-intro,
.case-study-page .give-media-section .media-label {
  width: 100%;
  text-align: left;
}

.case-study-page .give-media-section .media-label {
  margin-top: clamp(2rem, 4vw, 3rem);
}

.case-study-page .give-media-section .spotify-embed {
  margin-bottom: 8px;
}

.case-study-page .give-media-section .spotify-embed + .media-label {
  margin-top: 8px;
}

.case-study-page #jolapdf {
  width: min(90%, 680px);
  min-height: 0;
  margin: clamp(2rem, 5vw, 4rem) auto;
}

.case-study-page #jolapdf iframe {
  display: block;
  width: 100%;
  height: auto;
  min-height: 440px;
  aspect-ratio: 4 / 3;
  border: 0;
}

.case-study-page #solution3parent {
  max-width: 100%;
}

.case-study-page #solution3img {
  width: min(100%, 600px);
  height: auto;
}

.case-study-page .keen-slider,
.case-study-page #photoslides {
  max-width: 100%;
}

@media (max-width: 1100px) {
  .about-page #bigcontainer {
    grid-template-columns: 1fr 0.8fr;
  }

  .case-study-page .smallcontainer2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  #navbar ul {
    min-height: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 0.8rem;
    padding: 0.75rem 1rem 1rem;
    font-size: clamp(1rem, 4.7vw, 1.15rem);
  }

  #navbar #logo {
    flex: 0 0 100%;
    margin: 0;
    display: flex;
    justify-content: center;
  }

  #navbar .navhover {
    padding-inline: 0.15rem;
  }

  #footer {
    flex-direction: column;
    text-align: center;
    padding-block: 1.75rem !important;
  }

  .home-page #experiencecontainer {
    grid-template-columns: minmax(0, 500px);
  }

  .home-page .blackoutbox {
    display: none;
  }

  .home-page .ex_box {
    background-color: #fb9a47;
  }

  .home-page .ex_box .overlaytext {
    opacity: 1;
    font-size: clamp(1.25rem, 6vw, 1.75rem);
  }

  .home-page .ex_box img {
    opacity: 0.12;
  }

  .about-page #bigcontainer {
    width: min(100% - 2.5rem, 680px);
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .about-page #title {
    padding-top: 3rem;
  }

  .about-page #mephoto {
    order: -1;
    margin-top: 2rem;
  }

  .case-study-page #bigcontainer {
    width: min(100% - 2.5rem, 680px);
    min-height: 350px;
  }

  .case-study-page .smallcontainer2,
  .case-study-page .bothcontainer {
    width: min(100% - 2.5rem, 680px);
    grid-template-columns: 1fr;
  }

  .case-study-page .smallcontainer2 {
    gap: 2rem;
  }

  .case-study-page .bothcontainer {
    gap: 0.75rem;
  }

  .case-study-page .titlecontainer:not(:first-child) {
    margin-top: 2rem;
  }

  .case-study-page .header3 {
    font-size: 1.35rem;
    font-weight: 500;
  }

  .case-study-page .iframes {
    padding: 1rem;
  }

  .case-study-page .embed-frame {
    padding: 0;
  }

  .case-study-page .media-section {
    width: min(100% - 2.5rem, 680px);
  }

  .case-study-page .implementation-gallery {
    grid-template-columns: 1fr;
  }

  .case-study-page .implementation-gallery .implementation-wide {
    grid-column: auto;
  }

  .case-study-page .spotify-embed iframe {
    aspect-ratio: auto;
    height: 352px;
  }

  .case-study-page .website-embed iframe {
    height: 500px;
    min-height: 500px;
  }

  .case-study-page #jolapdf {
    width: min(100% - 2.5rem, 680px);
  }

  .case-study-page #jolapdf iframe {
    min-height: 360px;
  }

  [class^="number-slide"],
  [class*=" number-slide"] {
    height: min(75vw, 500px);
  }
}

@media (hover: none) {
  .home-page .ex_box {
    background-color: #fb9a47;
  }

  .home-page .ex_box .overlaytext {
    opacity: 1;
  }

  .home-page .ex_box img {
    opacity: 0.12;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
