:root {
  --accent: #a0522d;
  --bg-primary: #e5e5e5;
  --bg-secondary: #515151;
}

html {
  margin: 0;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: "barlow", sans-serif;
}

h1,
h2 {
  text-transform: uppercase;
  font-weight: 300;
  font-size: 1.4rem;
}

p {
  font-weight: 300;
}

.hero,
.project-hero {
  position: relative;
}

.hero img {
  width: 100vw;
  height: 100vh;
  /* to account for address bar overlap */
  height: 100dvh;
  object-fit: cover;
  object-position: 45% 50%;
}

.hero-img-overlay,
.projects-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #161616ff 0%, #51515100 50%);
}

.navbar-top {
  position: absolute;
  top: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, #262626f2 4%, #26262680, #26262600);
  z-index: 100;
}

.navbar img {
  width: 35vw;
  max-width: 160px;
  height: auto;
  margin: 10px auto auto 1vw;
}

.nav-mobile-btn img {
  width: 12vw;
  max-width: 65px;
  height: auto;
  margin: 0 1vw 0 auto;
}

/* AGHGHHGHGHG OH MY GOD */
.nav-links {
  position: fixed;
  display: flex;
  top: 0;
  left: 0;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  background: linear-gradient(to bottom, #ffffffe0 99%, #26262690, #94949400);
  flex-direction: column;
  margin: 0;
  z-index: 99;
  transition: max-height 0.5s ease;
  padding-left: 0;

  & li {
    margin: 10px 30px 10px 10px;
    text-align: end;
    list-style-type: none;
    border-right: 2px solid var(--accent);
    padding-right: 5px;
  }

  & li:last-child {
    margin-bottom: 20px;
  }

  & li a {
    font-size: 2rem;
    text-decoration: none;
    color: #000;
    font-weight: 500;
    font-variant: small-caps;
  }
}

.nav-links::before {
  content: "";
  display: block;
  min-height: 60px;
  flex-shrink: 0;
}

.nav-links.open {
  max-height: 50vh;
}

.navbar-top.open {
  position: fixed;
}

.hero-text {
  position: absolute;
  width: 100%;
  bottom: 5%;

  & p,
  & h1 {
    margin: 0 0 0 5px;
    color: #fff;
    text-transform: uppercase;
    font-weight: 700;
  }

  & p {
    font-size: 1.3rem;
  }

  & h1 {
    font-size: 2.3rem;
  }
}

.hero-btn,
.page-btn {
  display: block;
  color: #fff;
  background-color: var(--accent);
  text-decoration: none;
  font-size: 1.3rem;
  padding: 5px 15px;
  text-transform: uppercase;
  text-align: center;
  width: fit-content;
  margin: 80px auto 0;
}

.page-bg {
  background-image: url("../img/plans-bg.webp");
  background-repeat: no-repeat;
  background-size: 200vh auto;
  background-position: -390px -150px;
  padding-bottom: 10px;
}

.intro {
  margin: 25px 0 0 5px;

  & h1,
  & h2 {
    margin: 0;
    line-height: 1.4;
  }
}

.block-p,
project-card p {
  font-size: 1.2rem;
  line-height: 1.4;
}

.services-block {
  padding: 5px 0;
  background-color: var(--bg-primary);

  & h2 {
    margin: 10px;
    border-bottom: 1px solid #000;
    padding-bottom: 10px;
  }

  & ul {
    padding-left: 10px;
  }

  & ul li {
    padding-left: 5px;
    list-style-type: none;
    text-transform: uppercase;
    font-size: 1.3rem;
    font-weight: 300;
    border-left: 2px solid var(--accent);
    margin: 20px 0 20px 0;
  }
}

.decor-img,
.career-img {
  display: none;
}

.commitment-block,
.careers,
.career-block {
  margin-top: 30px;

  & h2 {
    margin: 5px 10px 0 10px;
    border-top: 1px solid var(--accent);
  }

  & p {
    margin: 10px;
  }
}

.safety-block {
  position: relative;

  & img {
    width: 100%;
    height: auto;
  }
}

.safety-note {
  position: relative;
  margin-top: -40px;
  margin-left: 5vw;
  margin-right: 5vw;

  display: block;
  padding: 10px;
  background-color: var(--bg-secondary);
  box-shadow:
    inset 0px 4px 4px 0px rgba(0, 0, 0, 0.25),
    3px 3px 10px 0px rgba(0, 0, 0, 0.25);
  color: #fff;

  & h2 {
    font-size: 1.5rem;
    margin: 5px;
    border-bottom: 1px solid var(--accent);
  }

  & p {
    margin: 5px;
  }
}

.career-block {
  & .page-btn {
    margin: 20px auto;
  }
}

footer {
  background-color: var(--bg-primary);
  padding-bottom: 10px;

  & ul {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0;
    padding-top: 20px;
    list-style-type: none;
    margin-left: 25px;
  }

  & ul li a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
    text-transform: uppercase;
  }

  & img {
    width: 150px;
    display: block;
    margin: 0 auto;
  }

  & p {
    font-weight: 300;
    text-transform: uppercase;
    text-align: center;
    margin: 5px auto;
  }

  & #author {
    font-size: 0.8rem;
  }

  & #author a {
    color: #000;
  }
}

.careers-hero {
  & img {
    object-position: 50% center;
  }
}

#career-btn.apply-btn-disabled {
  cursor: not-allowed;
  pointer-events: none;
  background: var(--bg-secondary);
  margin-top: 5px;
}

.apply-status {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.apply-container {
  margin: 10px;
}

.apply-by-email {
  max-width: 1115px;
  background-color: var(--bg-primary);
  padding: 5px 10px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--bg-secondary);
}

/* Projects Page - Mobile */

/* Without the >, this messes up the nav icons. With it, it only targets
* the background. But it doesn't have that issue on the home page hero.
* Not sure why. */
.secondary-hero-text {
  & p {
    font-size: 1rem;
    font-weight: 300;
  }

  & h1 {
    font-size: 2rem;
  }
}

.projects-hero > img,
.project-hero > img {
  height: 50vh;
  height: 50dvh;
}

.proj-img-pos {
  & img {
    object-position: 25% center;
  }
}

.project-list {
  & h2 {
    text-align: center;
  }
}

.project-card {
  display: flex;
  flex-direction: column;

  border-radius: 0.1rem;
  text-decoration: none;
  padding-top: 1rem;

  & p {
    font-weight: 300;
    color: #000;
    text-align: left;
    margin: 5px auto 5px 0px;
    line-height: 1;
  }

  & img {
    aspect-ratio: 16/10;
    display: block;
    height: auto;
    width: 100%;
    border-radius: 0.1rem;
  }
}

.project-card p.type {
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
}

.project-card p.title {
  font-size: 1.2rem;
  margin: 0.2rem 0 0.5rem 0;
}

.project-card p.location {
  text-transform: uppercase;
  color: var(--bg-secondary);
  font-size: 1rem;
  font-weight: 500;
  margin-top: auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  max-width: 1400px;
  gap: 2.5rem;
  padding: 1rem;
  justify-content: center;
  margin: 0 auto;
}

/* Individual Project Page - Mobile */

.project-container {
  & h1 {
    margin: 0 0 5px 5px;
  }

  & p {
    margin: 5px;
  }
}

.project-info {
  display: flex;
  flex-direction: column;

  & p {
    border-top: 1px solid var(--accent);
    font-size: 1.2rem;
    margin: 10px 2vw;
    font-weight: 500;
  }

  & span {
    font-weight: 300;
  }
}

.project-hero .hero-text .project-status {
  font-weight: 300;
}

.project-desc {
  background-color: var(--bg-primary);
  font-size: 1.2rem;
  padding: 5px 5px;
  margin: 10px 0 0;
  line-height: 1.4;
}

.project-status {
  margin: 0 0 5px 5px;
}

#project-btn,
#career-btn {
  margin: 3vh auto;
}

/* 768px */
@media screen and (min-width: 48rem) {
  .hero-text {
    & p {
      font-size: 2rem;
    }

    & h1 {
      font-size: 3rem;
    }
  }

  .hero-btn {
    font-size: 2rem;
    margin: 15px auto auto 5px;
  }

  .block-p,
  .project-card p {
    font-size: 1.4rem;
  }

  h2 {
    font-size: clamp(1.5rem, 3.18vw, 2rem);
  }

  .intro {
    display: grid;
    grid-template-columns: 1fr 1fr;

    grid-template-areas:
      "intro intro-line"
      "para para";
  }

  .intro h2 {
    grid-area: intro;
  }

  .intro-line {
    grid-area: intro-line;
    border-bottom: 1px solid var(--accent);
    align-self: center;
  }

  .intro p {
    grid-area: para;
    font-size: 1.4rem;
  }

  .services {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "service-blk decor-img";

    & ul li {
      font-size: 1.5rem;
    }

    margin-bottom: 5vh;
  }

  .services-block {
    grid-area: service-blk;
  }

  .commitment-block {
    margin: 0 2vw 2vh;
  }

  .decor-img {
    display: block;
    grid-area: decor-img;
    width: 100%;
    height: auto;
    margin-left: 5px;
    align-self: center;
  }

  .safety-block {
    & img {
      display: block;
      width: 90%;
      margin: auto;
    }
  }

  .safety-note {
    margin-left: 7vw;
    margin-right: 7vw;

    & h2 {
      font-size: clamp(1.5rem, 3.18vw, 2rem);
    }
  }

  .careers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "career-blk career-img";
  }

  .career-block {
    grid-area: career-blk;

    & .page-btn {
      margin: 2vh auto 0 10px;
      padding-bottom: 7px;
    }
  }

  .career-img {
    grid-area: career-img;
    display: block;
    width: 100%;
    height: auto;
    align-self: center;
  }
}

/* 1024px */
@media screen and (min-width: 64rem) {
  .nav-links {
    position: absolute;
    top: 0px;
    left: unset;
    right: 10px;
    overflow: visible;
    display: flex;
    flex-direction: row;
    gap: 30px;
    margin-right: 15px;
    padding-top: 0;
    width: max-content;
    height: auto;
    z-index: 101;

    & li {
      list-style-type: none;
    }

    & li a {
      font-size: 2rem;
      text-decoration: none;
      color: #fff;
      font-variant: small-caps;
    }
  }

  .nav-links li a {
    display: inline-block;
    position: relative;
    transition: transform 0.2s ease;
  }

  .nav-links li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 1px;
    background-color: #fff;
    transition: width 0.3s ease;
  }

  .nav-links li a:hover {
    transform: scale(1.1);
  }

  .nav-links li a:hover::after {
    width: 100%;
  }

  .nav-mobile-btn {
    display: none;
  }

  .hero-text {
    & p {
      font-size: 2rem;
    }

    & h1 {
      font-size: 4rem;
    }
  }

  .hero-btn,
  .page-btn {
    font-size: 2.5rem;
    margin: 15px auto auto 5px;
    z-index: 0;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease;
  }

  .hero-btn::before,
  .page-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #fff;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: -1;
  }

  .hero-btn:hover,
  .page-btn:hover {
    color: #000;
  }

  .hero-btn:hover::before,
  .page-btn:hover::before {
    transform: translateX(0);
  }

  .block-p,
  .project-card p {
    font-size: 1.4rem;
  }

  h2 {
    font-size: clamp(1.5rem, 3.18vw, 2rem);
  }

  .services-block {
    max-width: 40vw;
    margin: auto 0 auto 0;
    padding: 10px;
  }

  .commitment-block {
    margin-top: 70px;
  }
  .commitment-block {
    margin: 0 2vw 2vh;
  }

  .decor-img {
    display: block;
    grid-area: decor-img;
    width: 100%;
    margin-left: 5px;
    align-self: center;
  }

  .safety-block {
    & img {
      display: block;
    }
  }

  .safety-note {
    & h2 {
      font-size: clamp(1.5rem, 3.18vw, 2rem);
    }
  }

  .careers {
    margin-top: 70px;
    margin-bottom: 35px;
  }

  .career-block {
    margin: 0vh 1vw;
  }

  .page-btn {
    margin-top: 2vh;
  }

  .project-info {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;

    & p {
      font-size: 1.4rem;
      border-top: 2px solid var(--accent);
    }
  }

  div.project-desc {
    margin: 5vh auto;
    padding: 3vh 5vw;
    max-width: 70%;
  }
}

/* 1536px */
@media screen and (min-width: 96rem) {
  .hero-text {
    & p {
      font-size: clamp(3rem, 3.4vw, 10rem);
    }

    & h1 {
      font-size: clamp(5rem, 5vw, 15rem);
    }
  }

  .secondary-hero-text {
    & p {
      font-size: clamp(3rem, 2.05vw, 5rem);
    }

    & h1 {
      font-size: clamp(5rem, 3.4vw, 10rem);
    }
  }

  .hero-btn {
    font-size: clamp(1rem, 2vw, 6rem);
    margin-left: 15px;
  }

  .navbar-top a img {
    margin-top: 15px;
    min-width: clamp(150px, 8.4vw, 230px);
  }

  .nav-links li a {
    font-size: clamp(2rem, 1.7vw, 4rem);
  }

  h2 {
    font-size: clamp(2rem, 2.8vw, 7.2rem);
  }

  p.block-p {
    font-size: clamp(1.5rem, 1.5vw, 5rem);
  }

  .project-card {
    & p.title {
      font-size: 1.6rem;
      margin: 10px 0 15px;
    }

    & p.type,
    & p.location {
      font-size: 1.3rem;
    }
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 480px));
    max-width: 2000px;
    gap: 5rem;
  }

  .project-info,
  .project-desc {
    & p {
      font-size: clamp(2rem, 1vw, 3rem);
    }
  }

  div.project-info {
    margin-top: 3vh;
  }

  .project-hero .hero-text {
    & p {
      font-size: clamp(3rem, 2.1vw, 6rem);
    }

    & h1 {
      font-size: clamp(5rem, 2.8vw, 8rem);
    }
  }

  .services {
    grid-template-columns: 2.5fr 4.5fr;
  }

  .services-block {
    max-width: 40vw;
    max-height: fit-content;
    margin: auto auto auto 0;
    padding: 10px;

    & ul li {
      font-size: clamp(2rem, 2vw, 6.2rem);
      line-height: 1.8;
    }
  }

  .decor-img {
    max-width: 50vw;
    margin-left: auto;
  }

  .safety-note {
    margin-top: -60px;
    padding: clamp(10px, 1.2vw, 50px);

    & h2 {
      font-size: clamp(3rem, 3.18vw, 7.2rem);
    }
  }

  .page-btn {
    font-size: clamp(1rem, 2vw, 6rem);
  }

  footer {
    & ul {
      margin-left: 50px;
      gap: clamp(30px, 2.35vw, 100px);
    }

    & ul li {
      margin: 0;
    }

    & ul li a,
    & p {
      font-size: clamp(1.3rem, 1.3vw, 3rem);
    }
  }
}

@media screen and (min-width: 240rem) {
  footer {
    & ul {
      margin-left: 80px;
    }
  }
}
