:root {
  font-family: Inter, Roboto, Helvetica, serif;

  --text: black;
  --alt-text: var(--bg);
  --alt-text-2: hsl(0 0% 45%);

  --bg: white;
  --alt-bg: var(--text);
  --alt-bg-2: hsl(208 5 10%);

  --accent: hsl(50 99% 49%);
  --accent-5: hsl(255 96 68%);

  --navbar-height: 5rem;
  --img-border-radius: 36px;
}

*,
*::before,
*::after {
  margin: 0;
  box-sizing: border-box;
}

html, body, main {
  margin: 0;
  padding: 0;

  color: var(--text);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main > * {
  padding: 8rem 0;
}

a, h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: Inter, Roboto;
}

p {
  margin-top: 1em;
  max-width: 90ch;
}

img {
  max-width: 100%;
}

a.button {
  padding: .85em 2em;
  border: none;
  border-radius: var(--img-border-radius);

  text-align: center;
  text-decoration: none;
  max-width: fit-content;
  color: var(--alt-text);
  font-size: 14px;
  font-weight: 500;
  background: var(--alt-bg);
}

a.button:hover {
  color: var(--alt-text);
  cursor: pointer;
}

.background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  z-index: -1;
}

nav {
  position: sticky;
  top: 0;
  z-index: 1;

  display: flex;
  align-items: center;
  gap: 2rem;

  width: 100%;
  height: var(--navbar-height);
  box-sizing: border-box;
  padding: .5rem 4vw;
  border-bottom: 1px solid hsl(0 0% 90%);
  background-color: var(--bg);
}

nav a, nav p {
  font-size: 12pt;
  font-weight: 500;
  color: var(--alt-text-2);
  text-decoration: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* For some reason breaks with max-width 100% */
.logo > img {
  max-width: 48px;
}

.logo > p {
  color: var(--text);
  font-weight: bold;
  font-size: 22pt;
  margin-top: 0;
}

.nav_links {
  display: flex;
  align-items: center;
  gap: 1.75rem;

  width: 100%;
}

/* Decorate navbar links on hover */
.nav_links > a:nth-child(n+1):hover {
  text-decoration: underline;
}

.nav_links > a:last-child {
  margin-left: auto;

  color: var(--alt-text);
  background-color: var(--alt-bg);
}

.nav_links > a:last-child:hover {
  text-decoration: none;
  color: var(--text);
  background-color: var(--accent);
}

/* Toggle to display nav links on mobile */
nav > input, nav > label {
  display: none;
  width: 0;
  height: 0;
}

@media (width <= 800px) {
  nav > label {
    display: block;
    width: 28px;
    height: 24px;
    margin-left: auto;
    cursor: pointer;

    background-image: url("/assets/list.svg");
    background-repeat: no-repeat;
    background-size: cover;
  }

  .nav_links {
    display: none;
  }

  #nav_toggle:checked ~ .nav_links {
    position: absolute;
    top: 4rem;
    left: 0;

    display: flex;
    flex-direction: column;
    gap: 2.5rem;

    background: var(--bg);
    padding: 2rem 0;
    border-bottom: 1px solid hsl(0 0% 90%);
  }

  .nav_links > a:last-child {
    margin-left: 0;
    padding: .85em 25%;
  }
}

main {
  box-sizing: border-box;
}

.scroll_pos {
  position: relative;
  margin: 0;
  padding: 0;
  top: calc(var(--navbar-height) * -1 - 1rem);
}

.section_name {
  padding: .5em .75em;
  border-radius: var(--img-border-radius);

  background: #f9f7f2;
  color: hsl(0 0% 30%);
  font-weight: 500;
  font-size: 10pt;
}

.section_heading {
  margin-top: .25em;
  max-width: min(20ch, 100%);

  text-align: center;
  font-size: 38pt;
  font-weight: 500;
  letter-spacing: -2px;
}

.icon_list {
  display: flex;
  flex-direction: column;
  gap: 2rem 3rem;
  padding: 0;
}

.icon_list ::marker {
  content: '';
}

.icon_list_item {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.icon_list_marker {
  background-color: var(--accent);
  border-radius: var(--img-border-radius);
  padding: .4em;
  font-weight: bold;
}

.icon_list_item_text {
  margin: 0;
  font-weight: 500;
}

.hero {
  --bg-opacity: 0.6;
  --lightness: 0.8;

  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-evenly;
  gap: 2.5rem 0;

  min-height: calc(95vh - var(--navbar-height));
  padding: 4vw;

  color: var(--alt-text);
}

.hero_content {
  grid-area: 1/1;
  max-width: 36ch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  color: var(--text);
}

.hero_content > h1 {
  font-size: 45pt;
  font-weight: 500;
  letter-spacing: -4px;
  text-indent: -.10ch;
}

.hero_content p {
  color: var(--alt-text-2);
  font-size: 12.5pt;
  font-weight: 500;
  max-width: max(90ch, 45vw);
  padding-left: .5em;
}

.hero_content > a {
  margin-top: 1em;
}

.hero_content > a:hover {
  text-decoration: none;

  color: var(--text);
  background-color: var(--accent);
}

.hero_content > .icon_list {
  padding: 1rem 0;
  gap: .75rem;
}

.hero_content .icon_list_item {
  gap: 0;
}

.hero_content .icon_list_marker {
  padding: .2rem;
}

.hero_content .icon_list_item_text {
  font-size: 12pt;
}

.hero_bg {
  grid-area: 1/2;
  border-radius: 32px;
  min-height: 631px;
  max-width: min(584px, 100%);
  object-fit: cover;
}

.testimonials {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;

  min-height: 26rem;
  color: var(--text);
  background-color: var(--bg);
  background: #f9f7f2;
}

.testimonials > h1 {
  font-size: 15pt;
  font-weight: 600;
  text-align: center;
}

.testimonials > a {
  font-size: 16pt;
  background: var(--bg);
  border: 1px solid var(--alt-bg);
  padding: 1em 2em;

  color: var(--text);
  text-align: center;
  text-decoration: none;
}

.testimonials > a:hover {
  border: 1px solid var(--accent-5);
  font-weight: bold;
  color: var(--alt-text);
  background: var(--accent-5);
}

.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8rem 0;
}

.about > .owner_info {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 4rem;
  width: 64.5vw;
  min-height: 34.5rem;
  place-items: center;

  padding: max(1rem, 4vw);
  border-radius: var(--img-border-radius);
  background: #f9f7f2;
  margin-top: 4rem;
}

@media (width <= 1000px) {
  .about > .owner_info {
    grid-template-columns: 1fr;
    width: 85vw;
    height: auto;
  }

  .about > .owner_info > p {
    grid-area: 2/1;
  }
}

.about > .owner_info > img {
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: var(--img-border-radius);
}

.about > .owner_info > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about > .owner_info p {
  width: min(45ch, 100%);
  font-weight: 600;
  font-size: 13.5pt;
  translate: 0 -1rem;
}

.services {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 0;
}

.services > .section_content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  place-items: center;
  width: min(80rem, 100%);

  min-height: 42rem;
  padding: max(1rem, 4vw);
}

.services > .section_content > ul {
  margin-top: 2rem;
}

.services > .section_content > div {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

article.services:nth-of-type(odd) > .section_content > img {
  grid-area: 1/2;
  margin-left: auto;
}

.services > .section_content > div > p:nth-of-type(1) {
  font-size: 18pt;
  font-weight: 500;
  line-height: 1.4em;
  max-width: 40ch;
  margin-bottom: 1em;
  margin-top: 0;
}

/* Colour text that comes after the first element */
.services > .section_content > div > :nth-child(n + 2) {
  color: hsl(0 0% 35%);
}

.services > .section_content > div > ul li {
  max-width: 48ch;
}

.services > .section_content > img {
  object-fit: cover;
  height: 550px;
  width: 550px;
  border-radius: var(--img-border-radius);
  margin-inline: auto;
}

.services .icon_list {
  display: flex;
  flex-direction: column;
  gap: 2.5em;
}

.services .icon_list_marker {
  grid-area: icon;
  padding: .75em;
  margin-right: .5rem;
}

.services .icon_list_item {
  display: grid;
  align-items: start;
  grid-template-areas:
  "icon heading"
  "icon content";

  max-width: 48ch;
}

.services .icon_list_item > h2 {
  font-weight: 600;
  grid-area: heading;
}

.services .icon_list_item > p {
  grid-area: content;

  color: var(--alt-text-2);
  max-width: 40ch;
  font-weight: 500;
  text-wrap: wrap;
  margin-top: .25em;
}

@media (width <= 800px) {
  .services > .section_content {
    grid-template-columns: 1fr;
  }

  .services .icon_list {
    gap: 4rem;
  }

  .services .icon_list_item {
    gap: .75rem;
    place-items: center;
    grid-template-areas:
      "icon"
      "heading"
      "content";
  }

  .services .icon_list_marker {
    margin-right: 0;
  }

  .services > div {
    flex-direction: column;
    gap: 2rem;
  }

  .services > .section_content > img {
    width: 100%;
  }

  article.services:nth-of-type(odd) > .section_content > img {
    grid-area: auto;
  }
}

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;

  padding: 4rem 0;
  min-height: calc(80vh - var(--navbar-height) - var(--footer-height));
}

.contact .icon_list {
  flex-wrap: wrap;
  justify-content: center;

  margin-top: 1em;
  max-width: 48ch;
}

.contact > h1 {
  grid-area: 1 / 2;
  letter-spacing: -2px;
  font-weight: 700;
}

.contact > section {
  grid-area: 2 / 2;
}

.contact > form {
  grid-area: 3 / 2;
  min-width: min(23rem, 100%);
}

.contact_info > ul {
  flex-direction: row;
}

.contact_info > ul > li > img {
  background-color: var(--accent);
  border-radius: var(--img-border-radius);
  padding: .4rem;
}

.contact > form :is(input, select, textarea) {
  min-height: 2.5em;
  padding: .75em 1em;
  border: none;
  border-radius: 12px;

  background-color: hsl(0 0% 95.5%);
  color: var(--text);
  font-size: 10.5pt;
  font-weight: 500;
}

.contact > form :is(input, textarea)::placeholder {
  color: hsl(0 0% 55%);
}

.contact > form select {
  appearance: none;
  color: hsl(0 0% 55%);
  background-color: hsl(0 0% 96%);
  border: 1px solid hsl(0 0% 90%);
  padding: .75em 1em;
  font-weight: 500;
}

.contact > form > fieldset {
  display: grid;
  gap: 1.5rem;
  grid-template-areas:
    "service_type service_type"
    "name email"
    "message message"
    "submit submit";
  grid-auto-rows: max-content;

  border: none;
  padding: 1rem;
  font-family: Inter, Roboto;
}

.contact > form > fieldset > legend {
  color: hsl(0 0% 25%);
  font-size: 18pt;
  font-weight: 600;
  margin-top: 2em;
  letter-spacing: -1px;
}

.contact label {
  font-size: 10.5pt;
  margin-bottom: .5em;
  text-indent: 4px;
  color: hsl(0 0% 65%);
}

#service_type_field,
#name_field,
#phone_field,
#email_field,
#message_field,
#file_upload_field
{
  display: flex;
  flex-direction: column;
}

#service_type_field {
  grid-area: service_type;
  position: relative;
}

#service_type_field::after {
  content: url('/assets/angle-down-solid.svg');
  pointer-events: none;

  position: absolute;
  width: 12px;
  top: 57%;
  right: 3%;
  filter: invert(65%);
}

#name_field {
  grid-area: name;
}

#phone_field {
  grid-area: phone;
  margin-left: 1rem;
}

#email_field {
  grid-area: email;
}

#message_field {
  grid-area: message;
}

#file_upload_field {
  grid-area: file_upload
}

#file_upload_field > label {
  margin-top: .5em;
  font-size: 8pt;
}

#submit {
  grid-area: submit;
  min-height: 40px;
  cursor: pointer;

  background-color: var(--alt-bg);
  color: var(--alt-text);
  font-size: 11.5pt;
  font-weight: 800;
}

#submit:hover {
  text-decoration: none;

  color: var(--text);
  background-color: var(--accent);
}

@media (width <= 800px) {
  .contact > form > fieldset {
  grid-template-areas:
    "service_type"
    "name"
    "email"
    "message"
    "submit";
  }
}

footer {
  margin-top: auto;
  padding: 1rem 0;
  background-color: var(--bg);
  filter: invert();
}

footer > p {
  margin: 0 auto;
  width: fit-content;
}
