/*  -----------------------------------------------------------------------------------------
>>> TABLE OF CONTENTS
---------------------------------------------------------------------------------------------

  0.  CSS Reset
  1.  Document Setup
      a. Utility classes
  2.  Fonts
  3.  Colors
  4.  Layout
  5.  Components
      a. Buttons
  6.  Navigation
  7.  Header
  8.  Page: Frontpage 
  9. Footer
  10. Copyright
  11. Media Queries

-------------------------------------------------------------------------------------------*/

/*  ---------------------------------------------------------------------------------------*/

/*  0. CSS Reset

/*  ---------------------------------------------------------------------------------------*/

/* https://piccalil.li/blog/a-modern-css-reset/ */

/* Box sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    animation: none !important;
    transition-delay: 0s !important;
  }
}

/*  ---------------------------------------------------------------------------------------*/

/*  1. Document Setup

/*  ---------------------------------------------------------------------------------------*/

* {
  font-family: 'Open Sans', sans-serif;
  letter-spacing: 1px;
}

body,
html {
  height: 100%;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}



::selection {
  background: var(--text-color);
  color: var(--primary-bg-color);
}

::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: var(--primary-bg-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 3px;
}

/*  ---------------------------------------------------------------------------------------*/

/*  a. Utility classes

/*  ---------------------------------------------------------------------------------------*/


:root {
  --default-border-radius: 15px;
}

/*  ---------------------------------------------------------------------------------------*/

/*  2. Fonts

/*  ---------------------------------------------------------------------------------------*/

/*  ---------------------------------------------------------------------------------------*/

/*  3. Colors

/*  ---------------------------------------------------------------------------------------*/

:root {
  --primary-bg-color: #161616;
  --secondary-bg-color: #1e1e1e;
  --accent-bg-color: #212121;
  --text-color: #f5f5f5;
  --accent-color: #99CC00;
}

/*  ---------------------------------------------------------------------------------------*/

/*  4. Layout

/*  ---------------------------------------------------------------------------------------*/

body {
  font: 400 1rem/1.8 'Open Sans', sans-serif;
  background-color: var(--primary-bg-color);
  color: var(--text-color);
  letter-spacing: 0.0125rem;
  /* for the overlay */
  position: relative;
}


h1,
h2,
h3,
h4,
section h2 + p {
    letter-spacing: 0.025rem;
}

h1 {
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1.6;
}

h2 {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--accent-color);
    text-transform: uppercase;
    text-align: center;
}

h3 {
    font-size: 1.2rem;
    font-weight: 400;
}

h2 + p {
    font-size: 1.4rem;
    font-weight: 200;
}

h2,
h2 + p {
    margin-bottom: 1.8rem;
}

a {
    color: inherit;
    text-decoration: none;
}


.link {
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  color: var(--accent-color);
}

.link span::after {
  display: block;
  content: "";
  border-bottom: solid 2px var(--accent-color);
  transform: scaleX(0);
  transition: transform 0.4s;
}

.link:hover span::after {
  transform: scaleX(1);
}


.footer-link {
  font-weight: 400;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  cursor: pointer;
  color: var(--text-color);
}

.footer-link span::after {
  display: block;
  content: "";
  border-bottom: solid 2px var(--accent-color);
  transform: scaleX(0);
  transition: transform 0.4s;
}

.footer-link:hover span::after {
  transform: scaleX(1);
}


.cta-link {
  background-color: var(--accent-color);
  border-radius: 30px;
  padding: 0.6rem 1.5rem;
  color: #2a2a2a;
}

.cta-link:hover,
.cta-link:focus {
 border-color: rgba(0, 0, 0, 0.15);
 box-shadow: rgba(0, 0, 0, 0.1) 0 4px 12px;
 color: rgba(0, 0, 0, 0.65);
}

.cta-link:hover {
 transform: translateY(-1px);
}


.contained {
  max-width: 90rem;
  margin: 0 auto;
  width: 90%;
}

main {
  padding-bottom: 1.5rem;
}

main > * {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.bck-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  z-index: -1;
  display: grid;
  grid-template-columns: 1fr 4fr 4fr 1fr;
}

.bck-overlay .col:not(:last-child) {
  border-right: solid 1px rgba(236, 238, 247, 0.1);
}
.menu-overlay.show {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  background-color: rgba(22, 22, 22, 0.5);
  width: 100%;
  z-index: 0;
}

.visually-hidden {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  border: 0;
  padding: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.scroll-animation-hide {
  opacity: 0;
  transform: translateY(20%);
  transition: all 2.5s;
}

.scroll-animation-show {
  opacity: 1;
  transform: translateY(0);
}


/*  ---------------------------------------------------------------------------------------*/

/*  5. Components

/*  ---------------------------------------------------------------------------------------*/

/*  ---------------------------------------------------------------------------------------*/

/*  a. Buttons

/*  ---------------------------------------------------------------------------------------*/

/*  ---------------------------------------------------------------------------------------*/

/*  b. Spacer

/*  ---------------------------------------------------------------------------------------*/



/*  ---------------------------------------------------------------------------------------*/

/*  c. Scroll to top

/*  ---------------------------------------------------------------------------------------*/


/*  ---------------------------------------------------------------------------------------*/

/*  6. Navigation

/*  ---------------------------------------------------------------------------------------*/


/*  ---------------------------------------------------------------------------------------*/

/*  7. Header

/*  ---------------------------------------------------------------------------------------*/


header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.8rem;
  padding-bottom: 1.8rem;
}

.skip-link {
  position: absolute;
  left: 45%;
  padding: 0.5rem;
  transform: translateY(-200%);
  transition: transform 0.5s;
}

.skip-link:focus {
  transform: translateY(0%);
}

.logo {
  cursor: pointer;
}

.logo img {
  display: inline;
  vertical-align: baseline;
  width: 170px;
}


.hamburger-menu,
.close-menu {
  display: none;
  cursor: pointer;
}

nav.show {
  transform: translateX(0);
}

nav ul {
  display: flex;
  gap: 1.5rem;
}

nav ul,
.footer-services ul {
  list-style-type: none;
  padding: 0;
}

nav a {
  font-size: 1rem;
  letter-spacing: 0.03rem;
}

nav a::after {
  display: block;
  content: "";
  border-bottom: solid 2px var(--accent-color);
  transform: scaleX(0);
  transition: transform 0.4s;
}

nav a:hover::after {
  transform: scaleX(1);
}

/*  ---------------------------------------------------------------------------------------*/

/*  8. Page: Frontpage - index

/*  ---------------------------------------------------------------------------------------*/

/* Hero */

.hero section {
  margin-top: 3rem;
  margin-bottom: 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  justify-items: start;
}

.hero section p {
  grid-row: span 2;
}

.hero img {
  margin: 0 auto;
  border-radius: 10px;
}


/* About */

.about > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
}

.about > div > img {
  border-radius: var(--default-border-radius);
  order: -1;
}

.achievements {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin: 1.5rem 0 2rem 0;
}

.achievements span {
  display: block;
}

.achievements span:first-child {
  border-bottom: solid 2px var(--accent-color);
  margin-bottom: 0.6rem;
  padding-bottom: 0.6rem;
  font-size: 1.6rem;
}

/* Who we are */
.who-we-are {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
}

.who-we-are > div {
  display: flex;
  flex-direction: column;
  border-radius: var(--default-border-radius);
  background-color: var(--secondary-bg-color);
  text-align: center;
  padding: 2rem;
}

.who-we-are > div > img {
  order: -1;
  align-self: center;
}

.who-we-are h3 {
  margin: 1rem;
}

.who-we-are > div:nth-of-type(2) {
  position: relative;
  top: -50px;
  background-color: var(--accent-bg-color);
}

.who-we-are .link {
  justify-content: center;
  margin-top: 1rem;
}

/* Services */

.service-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem 9rem;
}

.service-item:nth-of-type(odd) > picture {
  order: -1;
}

.service-item:not(:last-child) {
  padding-bottom: 5rem;
}

.service-item-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
}

.service-item-content p {
  width: min(100%, 45ch);
}

.service-item-content > img {
  order: -1;
}

.service-item-content section > * + * {
  margin-top: 1.5rem;
}

.service-img {
  border-radius: var(--default-border-radius);
}


/* Testimonials */
.testimonial {
  display: grid;
  grid-template-columns: 1fr 4fr;
  gap: 1.5rem;
}

.testimonial-head span {
  display: block;
  text-align: left;
  margin-top: 2rem;
  font-size: 1.5rem;
  font-weight: 400;
  text-transform: capitalize;
  line-height: 1.5;
  color: var(--text-color);
}

.testimonial-content {
  display: flex;
  gap: 2rem;
}

.testimonial-content figure {
  padding: 1.5rem;
  border-radius: 15px;
  background-color: var(--secondary-bg-color);
}

.testimonial-content blockquote {
  margin-bottom: 1.5rem;
}

.testimonial-content blockquote p {
  margin: 1rem;
}

.profile-pic {
  border-radius: 50%;
  width: 20%;
}

.testimonial-content figure > div {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.testimonial-content figcaption span {
  display: block;
}

.client-designation {
  font-size: 0.9rem;
}

/* Blog */

.posts {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 3rem;
}

.post-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.post-item > img {
  order: -1;
  border-radius: var(--default-border-radius);
}

.post-item .more-link {
  margin-top: auto;
}

/* cta */
.cta {
  margin-top: 3rem;
  margin-bottom: 1rem;
  background-color: var(--secondary-bg-color);
  padding: 1.5rem;
  border-radius: var(--default-border-radius);
  text-align: center;
}

.cta h2 {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 0.8rem;
  color: var(--accent-color);
  text-transform: none;
}

.cta h2 span {
  font-style: italic;
}

.cta p {
  font-size: 1rem;
  line-height: 1.7rem;
  width: 60%;
  margin: auto;
}

.cta a {
  margin-top: 1.5rem;
  margin-bottom: 1.2rem;
}

/*  ---------------------------------------------------------------------------------------*/

/*  9. Footer

/*  ---------------------------------------------------------------------------------------*/

/* Footer */

footer {
  padding: 3rem 0;
}

footer .contained {
  width: 80%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
}

footer .logo {
  display: block;
  margin-bottom: 1.2rem;
}

footer h2 {
  margin-bottom: 1.6rem;
  text-align: left;
}

.footer-services li,
.footer-contact span {
  margin-bottom: 0.6rem;
}

.footer-contact span {
  display: block;
}



/*  ---------------------------------------------------------------------------------------*/

/*  10. Copyright

/*  ---------------------------------------------------------------------------------------*/

.copyright {
  display: block;
  width: 100%;
  font-size: 0.7rem;
}


/*  ---------------------------------------------------------------------------------------*/

/*  11. Media Queries

/*  ---------------------------------------------------------------------------------------*/

@media (max-width: 70rem) {
  h2 {
      text-align: left;
  }

  .hamburger-menu,
  .close-menu {
      display: inline-block;
      font-size: 1.5rem;
      background-color: var(--accent-color);
      border: none;
      border-radius: 50%;
      height: 45px;
      width: 45px;
  }

  nav {
      padding: 1.5rem 2.5rem 1.5rem 1.5rem;
      text-align: right;
      position: fixed;
      top: 0;
      right: 0;
      height: 100%;
      background-color: var(--primary-bg-color);
      z-index: 1;
      color: var(--text-color);
      width: 50%;
      transform: translateX(100%);
      transition: transform 0.5s;
  }

  nav ul {
      flex-direction: column;
      gap: 1.5rem;
      align-items: flex-end;
      margin-top: 2rem;
  }

  nav a {
      font-size: 1.2rem;
  }

  .hero section,
  .about > div,
  .service-item,
  .testimonial,
  footer .contained {
      grid-template-columns: 1fr;
  }

  .hero section {
      gap: 2rem;
  }

  .hero section p {
      grid-row: span 1;
  }

  .about > div > img {
      display: none;
  }

  .who-we-are {
      flex-direction: column;
      margin-top: 0;
  }

  .who-we-are > div:nth-of-type(2) {
      top: 0;
  }

  .gallery,
  .posts {
      grid-template-columns: 1fr 1fr;
  }

  .service-item:nth-of-type(n) > picture {
      order: -1;
  }

  .service-item-content p {
      width: min(75ch, 100%);
  }

  .testimonial-content {
      flex-direction: column;
  }

  .cta {
      text-align: left;
  }

  .cta h2 {
      line-height: 3rem;
      font-size: 1.8rem;
  }

  .cta p {
      width: 100%;
  }

  footer .contained {
      justify-items: left;
      gap: 3rem;
  }
}

@media (max-width: 40rem) {
  main > * {
      padding-top: 2rem;
      padding-bottom: 2rem;
  }

  nav {
      width: 75%;
  }

  .achievements {
      grid-template-columns: 1fr 1fr;
  }

  .achievements > div:nth-of-type(3) {
      display: none;
  }

  .service-item-content {
      grid-template-columns: 1fr;
      gap: 1rem;
  }

  .gallery,
  .posts {
      grid-template-columns: 1fr;
      grid-auto-rows: auto;
  }

  .gallery figure:nth-child(n) {
      grid-row: span 1;
      grid-column: span 1;
  }
}

@media (prefers-reduced-motion) {
  .scroll-animation-hide {
      transition: none;
  }
}




.btn {
  padding: 10px 20px;
  margin: 5px 4px 4px 0;
  display: inline-block;
  color: var(--text-color);
  background: var(--primary-bg-color);
  border: 1px solid var(--accent-color);
  transition: all 0.4s;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 400;
}
.btn:hover,.btn-active {
  background: var(--accent-color);
  color: var(--primary-bg-color);
  -webkit-transform: translateY(3px);
  -ms-transform: translateY(3px);
  transform: translateY(3px);
}




/* Gallery */

#galleri{
  position: relative;
}

.gallery-section {
  position: relative;
  z-index: 1;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 0.6rem;
}

.gallery a:nth-child(1) {
  grid-column: span 2;
}

.gallery a:nth-child(3),
.gallery a:nth-child(4) {
  grid-row: span 2;
}

.gallery a:nth-child(5),
.gallery a:nth-child(6),
.gallery a:nth-child(8) {
  grid-row: span 2;
}
.gallery a:nth-child(7) {
  grid-column: span 1;
}

.gallery img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  border-radius: var(--default-border-radius);
  transition: all 0.5s;
}

.gallery a {
  position: relative;
}
.gallery a figure {
  display: inline;
}
.gallery figcaption {
  color: var(--text-color);
  position: absolute;
  bottom: 0;
  padding: 1.5rem;
  opacity: 0;
  transform: translateY(20%);
  transition: all 0.5s;
}

.gallery a:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

.gallery a:hover img {
  filter: brightness(0.4);
}
.sets .hide {
  display: none;
}

/* resposive CSS Code */


input {
  display: none;
  visibility: hidden;
}
label {
  display: block;
  text-align: center;
  position: absolute;
  left: calc(50% - 100px);
  margin-top: 1rem;
}
.toggle-button {
  width: 190px;
}

#expand {
  height: 1200px;
  overflow: hidden;
  transition: height 0.5s;
}

@media (max-width: 40rem) {
#expand {
  height: 400px;
}
}

#toggle:checked ~ #expand {
  height: 100%;
}
label span::before {
  display: block;
  content: "Udvid galleriet";
  width: 140px;
}

#toggle:checked ~ label span::before{
  content: "Skjul galleri";
}


/* For best practice, move CSS below to an external CSS file. */
@keyframes rotation {
  0% {
    transform: rotate(0deg); }
  100% {
    transform: rotate(360deg); } }
#loader-wrapper {
  background-color: var(--primary-bg-color);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100%;
  height: 100%;
  text-align: center; }
.loader {
  width: 40px;
  height: 40px;
  border: 5px solid var(--accent-color);
  border-bottom-color: transparent;
  border-radius: 50%;
  margin-top:calc(50vh - 20px);
  display: inline-block;
  box-sizing: border-box;
  -webkit-animation: rotation 1s linear infinite;
  animation: rotation 1s linear infinite; }