@import url("header.css");
@import url("carousel.css");
@import url("footer.css");

/* General Reset */
body,
h1,
h2,
h3,
p,
a,
ul,
li,
input,
textarea,
button {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}
/* Let's remove some of the pesky persistence behaviour on mobile devices when a button has been pressed */
button:active {
  background: inherit;
  color: inherit;
  outline: none;
  box-shadow: none;
}

:root {
  /* Tell browsers we support both light and dark schemes */
  color-scheme: light dark;
}

/* Apply scroll padding to ensure sections are not hidden under the nav */
html {
  scroll-padding-top: 7.5rem;
  scroll-behavior: smooth;
}

/* Body Styling */
body {
  background: #f5f7fa;
  color: #444444;
  line-height: 1.7;
  padding-top: 7.5rem; /* Space for the fixed navbar */
  min-height: 100vh; /* Make the body at least the height of the viewport */
  display: flex;
  flex-direction: column;
}

/* Background */
@keyframes random-jumps {
  0% {
    background-position: 0% 0%;
  }
  10% {
    background-position: 40% 20%;
  }
  30% {
    background-position: 80% 30%;
  }
  50% {
    background-position: 20% 50%;
  }
  70% {
    background-position: 60% 70%;
  }
  90% {
    background-position: 10% 90%;
  }
  100% {
    background-position: 0% 0%;
  }
}

body {
  background-image: url("images/bg.jpg");
  background-size: cover;
  animation: random-jumps 25s linear infinite;
}

/* Container Styling */
.container {
  width: 85%;
  max-width: 67.5rem; /* ~1080px if root font size is 16px */
  margin: 0.625rem auto;
  padding: 0.625rem;
  flex: 1; /* Make the content area flexible to fill remaining space */
}

h1 {
  font-size: 3.5em;
  margin: 0;
  text-align: left;
  position: relative;
}
h1:after {
  content: "";
  display: block;
  width: 100%;
  height: 1.5rem;
  background: #fa8c0a;
  margin: 0 0 2.5rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("images/hero.webp") center center/cover no-repeat;
  color: #ffffff;
  text-align: center;
  padding: 6.25rem 1.25rem;
  border-radius: 0.625rem;
  margin-top: 1.25rem;
}
.hero h1 {
  all: unset; /* Resets all inherited and applied styles */
  font-size: 3.5em;
  margin-bottom: 0.9375rem;
}
.hero h1:after {
  content: none; /* Removes the global `h1:after` pseudo-element */
}
.hero p {
  font-size: 2em;
}
h2 {
  font-size: 2em;
  margin: 0;
  text-align: left;
  position: relative;
}
h2:after {
  content: "";
  display: block;
  width: 3.75rem;
  height: 6px;
  background: #fa8c0a;
  margin: 0 0 1.875rem;
}

h3 {
  background: #fae2b8; /* Light orange highlight */
  display: flex; /* Turn into a flex container */
  justify-content: space-between; /* Distribute items to edges */
  width: 100%; /* Ensure full width within container */
  box-sizing: border-box; /* Include padding in width calculations */
  padding: 0.3125em 0.625em; /* Adjust padding in em units */
  margin: 0; /* Remove margins */
  border-radius: 0.3125rem; /* Rounded corners */
}

h4 {
  background: #fbe9d5; /* Softer, lighter orange highlight */
  display: flex; /* Flex container for consistent alignment */
  justify-content: flex-start; /* Align items to the start */
  width: 100%; /* Full width within container */
  box-sizing: border-box; /* Include padding in width calculations */
  padding: 0.25em 0.5em; /* Slightly smaller padding */
  margin: 0.25em 0; /* Add a small vertical margin */
  border-radius: 0.25rem; /* Subtly rounded corners */
  font-size: 0.9em; /* Slightly smaller font size */
  font-weight: normal; /* Less bold appearance */
  color: #555; /* Softer text color for subtlety */
}

.highlight {
  background-color: rgb(222, 222, 222);
}

/* Links Styling for text links only */
a:not(:has(img)) {
  color: #fa8c0a;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease, box-shadow 0.3s ease;
}
a:not(:has(img)):hover {
  color: #ffbf70;
  box-shadow: 0 0.25rem 0 #fa8c0a;
}
a:not(:has(img)):focus {
  outline: 2px solid #fa8c0a;
  outline-offset: 2px;
}

/* White Box Styling */
.mission-container,
.vision-container,
.services-container,
.approach-container,
.service-item,
.case-study,
.howwework-item,
.whatwebuild-item,
.about-container,
.general-container,
.insights-container,
.wordlist-container,
.contact-container,
.intro-container {
  background: #ffffff;
  box-shadow: 0px 4px 0.625rem rgba(0, 0, 0, 0.15),
    0px 8px 2rem rgba(0, 0, 0, 0.1);
  border-radius: 0.625rem;
  padding: 1.25rem;
  margin-bottom: 0.625rem;
}

.about-container {
  font-size: larger;
  background: linear-gradient(
      rgba(255, 255, 255, 0.9),
      rgba(255, 255, 255, 0.8),
      rgba(255, 255, 255, 0.1),
      rgba(255, 255, 255, 0.8),
      rgba(255, 255, 255, 0.9)
    ),
    url("images/logo-gradient-whiteBG.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
}

/* Columns for Mission, Vision, and Approach on the Home Page */
.three-column-section {
  display: flex;
  gap: 2rem;
  margin: 1rem 0;
  flex-direction: row;
  flex-wrap: nowrap;
}

.column {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 82%; /* Approximates to make all boxes equal height */
  max-width: 66vw; /* Use percentage of viewport width for max width */
  padding: 1%; /* Use percentage-based padding for flexibility */
  background: #ffffff;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  flex: 1;
}

.icon-container {
  display: flex;
  justify-content: center;
}

.text-container {
  text-align: left;
  margin: 1.25rem;
}

.icon {
  width: 10vw;
  max-width: 240px;
  min-width: 80px;
}

/* Services Overview */
.services-overview ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.services-overview ul li {
  background: rgba(255, 255, 255, 0.2);
  flex: 1 1 calc(48% - 0.625rem);
  margin: 0.625rem 0.625rem 0.625rem 0;
  padding: 1.25rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 0.625rem;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.services-overview ul li:hover {
  transform: translateY(-0.3125rem);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.service-item,
.howwework-item,
.whatwebuild-item {
  display: flex;
  align-items: center;
  margin-bottom: 1.875rem;
}

.service-item,
.whatwebuild-item {
  scroll-margin-top: 2.5rem;
}
.case-study {
  scroll-margin-top: 3.5rem;
}

/* Highlight the target service when it's linked to via a hash in the URL */
.service-item:target,
.whatwebuild-item:target,
.case-study:target {
  border: 2px solid #fa8c0a;
  box-shadow: 0 0 2rem rgba(250, 140, 10, 0.7); /* Add a glowing shadow effect */
  transition: all 0.75s ease-in-out;
}

.greyscale-icon {
  width: 15vw;
  max-width: 200px;
  min-width: 80px;
  margin-right: 0.625rem;
}

.service-item div,
.howwework-item div,
.whatwebuild-item div {
  display: block;
  width: 100%; /* Ensure the inner div takes the full width of the container */
  box-sizing: border-box; /* Include padding in width calculation */
}

.service-item h3,
.service-item p,
.service-item ul,
.case-study h3,
.case-study ul,
.howwework-item h3,
.howwework-item p,
.howwework-item ul,
.whatwebuild-item h3,
.whatwebuild-item p,
.whatwebuild-item ul {
  margin: 0;
  padding: 0;
}

.service-item ul,
.case-study ul,
.howwework-item ul,
.whatwebuild-item ul {
  margin-top: 0.625rem;
}

/* Services Container */
.services-container {
  background-color: #ffffff;
  padding: 1.875rem;
  box-shadow: 0px 4px 0.625rem rgba(0, 0, 0, 0.1);
  border-radius: 0.625rem;
}

/* Additional Sections */
.section-container {
  margin: 0.625rem auto;
  padding: 0.625rem;
  background: #fff;
  box-shadow: 0px 4px 0.625rem rgba(0, 0, 0, 0.1);
  border-radius: 0.625rem;
  text-align: center;
}

.logo-container {
  display: block;
  width: fit-content; /* Only as wide as the content */
}
.logo-container a {
}
.client-logo {
  max-width: 7.5rem;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0.75rem;
  transition: transform 0.5s ease-in-out;
}
.client-logo:hover {
  transform: scale(1.5);
}

.video-container {
  margin: 0 auto;
}
.iframe-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
}

.summary {
  padding: 2rem;
  text-align: center;
  max-width: 80vw;
  margin: 2rem auto;
}
.summary p {
  font-size: 2.4vw;
  font-style: italic;
  margin: 0 auto;
  line-height: 1.6;
  color: #fa8c0a;
}

/* Bullet Point Styling */
ul {
  list-style-type: none;
  padding-left: 0;
}
ul li {
  border-left: 0.125rem solid #fa8c0a;
  padding-left: 0.625rem;
  margin-bottom: 0.625rem;
}

/* Toggle icon styles */
.toggle-icon {
  font-size: 2rem;
  color: #444444;
  margin-left: 1rem;
}

/* Services links should stay default colour and weight;
   rest they can inherit from links styling */
.service-link {
  color: inherit;
  font-weight: normal;
}
.service-link:hover {
  color: inherit;
  font-weight: normal;
}

.privacy-policy p,
.terms-of-service p {
  padding-top: 0.625rem;
  padding-bottom: 1.25rem;
}

/* Vertical Line */
.vertical-line {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0.3125rem;
  background: #fa8c0a;
  z-index: 1;
}

/* Responsive Design for Tablet Screens */
@media screen and (max-width: 1024px), screen and (max-height: 768px) {
  /* 14pt if the default font is 16pt */
  html {
    font-size: 87.5%;
  }
  body {
    padding-top: 6.25rem;
  }
  .hero h1 {
    font-size: 3em;
  }
  .hero p {
    font-size: 1.75em;
  }
  header img.logo {
    height: 6.25rem;
  }
  .services-overview ul li,
  .howwework-item,
  .whatwebuild-item,
  .about-container,
  .contact-container {
    flex: 1 1 calc(48% - 0.625rem);
  }
  .client-logo {
    max-width: 6rem;
    max-height: 6rem;
    margin: 0.6rem;
  }
}
/* Responsive Design for Smaller Tablets and Large Phones */
@media screen and (max-width: 768px), screen and (max-height: 576px) {
  /* 12pt if the default font is 16pt */
  html {
    font-size: 75%;
  }
  body {
    padding-top: 4.4rem;
  }
  .hero h1 {
    font-size: 2.25em;
  }
  .hero p {
    font-size: 1.5em;
  }
  .three-column-section {
    flex-direction: column;
    align-items: center;
  }
  .services-overview ul li,
  .howwework-item,
  .whatwebuild-item,
  .about-container,
  .contact-container {
    width: 90%;
    margin-bottom: 1.25rem;
  }
  .services-overview ul {
    flex-direction: column;
    align-items: center;
  }
  .client-logo {
    max-width: 5rem;
    max-height: 5rem;
    margin: 0.5rem;
  }
  nav {
    padding: 0.3125rem 0;
  }
  .mobile-nav {
    width: 30%;
  }
  header img.logo {
    height: 5rem;
  }
  footer {
    padding: 0.625rem 0;
  }
  footer p {
    font-size: 0.85em;
  }
}
/* Responsive Design for Small Mobile Screens */
@media screen and (max-width: 480px), screen and (max-height: 480px) {
  /* 10pt if the default font is 16pt */
  html {
    font-size: 62.5%;
  }
  body {
    padding-top: 2.75rem;
  }
  .hero h1 {
    font-size: 1.75em;
  }
  .hero p {
    font-size: 1.1em;
  }
  .three-column-section {
    flex-direction: column;
    align-items: center;
  }
  .column,
  .services-overview ul li,
  .howwework-item,
  .whatwebuild-item,
  .about-container,
  .contact-container {
    width: 100%;
    padding: 0.9375rem;
    text-decoration: none;
  }
  .client-logo {
    max-width: 4rem;
    max-height: 4rem;
    margin: 0.4rem;
  }
  nav {
    padding: 0.125rem 0;
  }
  .mobile-nav {
    width: 40%;
  }
  header img.logo {
    height: 3.75rem;
  }
  footer {
    padding: 6px 0;
  }
  footer p {
    font-size: 0.7em;
  }
}

/* Dark Mode Styling */
@media (prefers-color-scheme: dark) {
  body {
    background: #121212; /* Dark background */
    color: #eeeeee; /* Light text color */
    background-image: url("images/bg-dark.jpg");
    background-size: cover;
    animation: random-jumps 25s linear infinite;
  }

  .mission-container,
  .vision-container,
  .services-container,
  .approach-container,
  .section-container,
  .service-item,
  .about-container,
  .case-study,
  .howwework-item,
  .whatwebuild-item,
  .general-container,
  .insights-container,
  .wordlist-container,
  .contact-container,
  .column {
    background: #333333; /* Darker background for boxes */
    box-shadow: 0px 4px 0.625rem rgba(0, 0, 0, 0.6),
      0px 8px 2rem rgba(0, 0, 0, 0.4); /* Subtle shadow */
  }

  .logo-container {
    background: #222222;
  }

  h3,
  h4 {
    background: #986100; /* Dark orange highlight */
    color: #fbe9d5; /* Light orange text */
  }

  footer {
    background: #1e1e1e;
    color: #e0e0e0;
  }

  .icon,
  .greyscale-icon {
    filter: invert(1); /* Invert colors */
  }

  .toggle-icon {
    color: #ffffff;
  }

  .about-container {
    font-size: larger;
    background: url("images/logo-dim-transparentBG.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
  }

  .highlight {
    background-color: #6b490f; /* Darker highlight */
  }

  .hero {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)),
      url("images/hero.webp") center center/cover no-repeat;
    color: #ffffff;
  }
}
