@import url(./colors.css);
@import url(./fonts.css);
@import url(./algemenestyling.css);
@import url(./cookiepopup.css);


/**************************
* MARK: Basis & Lightside Layout
**************************/
header {
  display: grid;
  position: relative;
  z-index: 300;

  @media (max-width: 1000px) {}

  @media (max-width: 500px) {
    background-image: linear-gradient(to top,
        var(--gradient-black-overlay-bg) 50%,
        var(--gradient-darkblueish-overlay-bg));
    opacity: 1;
    place-content: center;
  }
}

header>a:nth-of-type(1) {
  position: absolute;
  top: 1rem;
  left: -9999px;
  z-index: 100;
  padding: .5em;
  margin: .5em;
  font-weight: bold;
  background-color: var(--starwars-yellow);
  color: var(--text-color);
  outline-color: var(--gradient-black-overlay);

  &:focus-visible {
    left: 1rem;
  }
}

nav {
  position: relative;
  top: 2.5rem;
  display: flex;
  justify-content: space-around;
  align-self: start;
  width: 100%;
  grid-area: 1/1;
  z-index: 200;

  @media (max-width: 500px) {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 200;
  }
}

/* Lightsaber navigatiebalk */
ul {
  margin: 0;
  padding: 0;
  background: linear-gradient(to right,
      var(--lightsaber-lightgrey) 0% 30%,
      var(--lightsaber-light-blue) 30% 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  justify-content: center;
  place-content: center;

  list-style: none;
  width: 80%;
  height: 6rem;
  text-align: center;

  border-radius: 5rem 10rem 10rem 5rem;
  color: var(--text-color);

  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;

  @media (max-width: 500px) {
    position: fixed;
    bottom: 2%;
    width: 95%;
    border-radius: 3rem;
    height: 5rem;
    grid-template-columns: repeat(3, 1fr);
    background: linear-gradient(to right,
        var(--lightsaber-grey) 0% 30%,
        var(--lightsaber-light-blue) 30% 100%);
  }
}

li:nth-of-type(1) {
  grid-column: 1;
  grid-row: 1;
}

li:nth-of-type(2) {
  grid-column: 2;
  grid-row: 1;
}

li:nth-of-type(3) {
  grid-column: 3;
  grid-row: 1;
}


li a {
  font-size: var(--h3);
  color: var(--text-color);
  text-decoration: none;
  font-family: "Montserrat";

  @media (max-width: 500px) {
    display: grid;
    font-size: var(--p-disappear);
    justify-content: center;
    place-content: center;
    align-content: center;
    gap: 0.2rem;
  }
}

nav li:nth-of-type(1) a img,
nav li:nth-of-type(2) a img,
nav li:nth-of-type(3) a img {
  display: none;

  @media (max-width: 500px) {
    display: block;
    width: 5rem;
    height: 5rem;
    object-fit: contain;
    mix-blend-mode: normal;
    opacity: 1;
  }
}

a:focus-visible {
  outline: 3px solid var(--starwars-yellow);
  outline-offset: 5px;
}

/* ==================================================
   MARK: Smooth Dark/Light Mode Switch
   ================================================== */

#theme-toggle {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

li>label[for="theme-toggle"] {
  position: relative;
  display: inline-block;
  width: 3.2rem;
  height: 1.6rem;
  background-color: var(--lightsaber-grey);
  border: 2px solid var(--starwars-yellow);
  border-radius: 2rem;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;

  @media (max-width: 500px) {
    display: none;
  }
}

li>label[for="theme-toggle"]::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 2px;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  background-color: var(--starwars-yellow);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;

  @media (max-width: 500px) {
    width: 0.9rem;
    height: 0.9rem;
    left: 2px;
  }
}

#theme-toggle:checked+label[for="theme-toggle"] {
  background-color: var(--black-color);
  border-color: var(--lightsaber-red);
}

#theme-toggle:checked+label[for="theme-toggle"]::before {
  transform: translateY(-50%) translateX(1.5rem);
  background-color: var(--lightsaber-red);

  @media (max-width: 500px) {
    transform: translateY(-50%) translateX(1.2rem);
  }
}

#theme-toggle:focus-visible+label[for="theme-toggle"] {
  outline: 2px solid var(--starwars-yellow);
  outline-offset: 4px;
}

picture {
  grid-area: 1/1;
}

header img {
  grid-area: 1/1;
  width: 99.5vw;
  height: 100%;
  object-fit: contain;
  object-position: center 20%;
  mix-blend-mode: overlay;
  opacity: 1;

  @media (max-width: 1000px) {
    height: auto;
    width: 100%;
    object-position: center;
    place-items: center;
  }

  @media (max-width: 500px) {
    display: block;
    height: 70vh;
    width: 100%;
    object-fit: cover;
    object-position: left 75%;
    place-items: center;
  }
}

header>section {
  grid-area: 1 / 1;
  justify-self: end;
  align-self: center;
  width: 40%;
  margin-right: 5%;
  margin-top: 5rem;

  @media (max-width: 1000px) {
    width: 70%;
    margin-right: 5%;
  }

  @media (max-width: 500px) {
    justify-self: center;
    position: relative;
    align-self: end;
    width: 90%;
    margin: 25rem auto 4rem auto;
    text-align: left;
  }
}

header>section section {
 display: grid;
  gap: 1rem;
  background-color: var(--gradient-black-overlay);
  padding: 2.5rem;
  border-radius: 1.5rem;
  backdrop-filter: blur(6px);
}

section h1::before,
section h1 {
  font-family: 'Deathstar';
  letter-spacing: 0.5rem;
  font-size: var(--h1);
}

section p::before,
section p {
  font-family: "Montserrat";
  font-size: var(--p);
}


/**************************
* MARK: Main Content
**************************/
main {
  background-color: var(--bg-color);
  height: auto;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  gap: 5rem;

  @media (max-width: 500px) {
    background-color: var(--bg-color);
    min-height: 100vh;
    color: var(--text-color);
    position: static;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
  }
}

main.hide-content {
  display: none;
  background-color: var(--gradient-black-overlay-bg);
  opacity: .5;

  #ahsokacookie {
    display: block;
  }

  @media (max-width: 1000px) {}

  @media (max-width: 500px) {}
}

main>section:first-of-type {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(1rem, 1fr));
  place-content: center;
  width: 100vw;

  position: static;
  padding: 5rem 5rem 5rem 10rem;

  @media (max-width: 1000px) {
    padding: 0;
  }

  @media (max-width: 500px) {
    position: relative;
    top: 5rem;
    left: 0;
    right: 0;
    padding: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    justify-items: center;
    gap: 2rem;
  }
}

main>section:first-of-type>section {
  @media (max-width: 500px) {
    padding: 10rem;
  }
}

main section picture {
  grid-area: auto;
  margin: 0;
  padding: 0;
  grid-column: 2;
  grid-row: 2;

  display: block;
  width: 94%;
  justify-self: end;
  justify-items: right;
  rotate: calc(-10deg);

  @media (max-width: 1000px) {
    font-size: var(--h2);
  }

  @media (max-width: 500px) {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    justify-self: center;
    rotate: calc(0deg);
  }
}

main section h2 {
  font-family: "Deathstar";
  font-size: var(--h1);
  letter-spacing: .5rem;
  text-align: left;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: start;
  top: 25rem;
  max-width: 40rem;

  @media (max-width: 1000px) {
    font-size: var(--h2);
  }

  @media (max-width: 500px) {
    font-size: var(--h2);
    grid-column: 1;
    grid-row: 1;
    max-width: 100%;
    text-align: center;
  }
}

main section img {
  display: flex;
  justify-content: left;
  justify-items: start;
  width: 110%;
  height: auto;

  .yodaimg {
    z-index: -10;
  }

  @media (max-width: 1000px) {
    font-size: var(--h2);
  }

  @media (max-width: 500px) {
    width: 100%;
    height: auto;
    justify-content: center;
  }
}


/* ==========================================================================
    MARK: MAIN CHARACTER SECTION 
   ========================================================================== */

main>section:nth-of-type(2) {
  display: grid;
  justify-items: center;
  position: relative;
  z-index: 2;
  margin-top: -15rem;
  top: 2rem;
  width: 100%;

  @media (max-width: 1000px) {
    margin-top: 0;
  }
}

main>section:nth-of-type(2)>div {
  height: auto;
  width: min(96vw, 100rem);
  background: url(../images/datapad.svg) no-repeat center / 100% 100%;
  padding: 4rem 3.5rem 4rem 3.5rem;
  display: grid;
  gap: 2.5rem;

  @media(max-width: 1000px) {
    background-image: none;
    background-color: var(--grey-color);
    border-radius: 2rem;
    padding: 2.5rem 2rem;
    width: min(90vw, 52rem);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  @media(max-width: 500px) {
    background-image: none;
    background-color: var(--grey-color, #2b2b2b);
    border-radius: 1.5rem;
    padding: 2rem 1.2rem;
    width: 95vw;
  }

}

main>section:nth-of-type(2)>div>h2 {
  font-family: "Deathstar", san-serif;
  font-size: var(--h2);
  color: var(--bg-color);
  text-align: left;
  letter-spacing: 0.5rem;

  @media (max-width: 500px) {
    text-align: center;
  }
}

main>section:nth-of-type(2)>div>section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.5rem;
  width: 100%;

  @media(min-width: 1000px) {
    grid-template-columns: repeat(5, 1fr);
    height: auto;
    gap: 1.5rem;
  }

  @media(max-width: 500px) {
    grid-template-columns: 1fr;
  }
}

main>section:nth-of-type(2)>div>section>a {
  display: flex;
  flex-direction: column;
  height: 20rem;
  width: 100%;
  max-width: 25rem;
  justify-self: center;
  border-radius: 1.2rem;
  overflow: hidden;
  text-decoration: none;
  background-color: var(--lightsaber-grey);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  &:hover,
  &:focus-visible {
    transform: translateY(-4px);
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
  }

  &:focus-visible {
    outline: 2px solid var(--starwars-yellow);
    outline-offset: 3px;
  }
}

main>section:nth-of-type(2)>div>section>a>img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 70%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

main>section:nth-of-type(2)>div>section>a>h3 {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 30%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #f0f0f0;
  background-color: #151619;
}

main>section:nth-of-type(2)>div>a {
  background-color: var(--black-color);
  color: var(--starwars-yellow);
  width: 20rem;
  height: 5rem;

  position: relative;
  z-index: 1;

  display: grid;
  place-items: center;
  border-radius: 2.5rem;

  font-family: 'Montserrat';
  font-weight: 600;
  font-size: var(--p);
  text-align: center;

  text-decoration: none;
  text-transform: uppercase;


  @media(max-width:500px) {
    width: 19rem;
    height: 5rem;
    display: grid;
    place-items: center;
    border-radius: 2.5rem;
    text-align: center;
  }

  @media (max-width:1000px) {
    width: 19rem;
    height: 5rem;
    display: grid;
    place-items: center;
    border-radius: 2.5rem;
    text-align: center;
  }
}

main>section:nth-of-type(2)>div>a::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  background: linear-gradient(to right,
      var(--lightsaber-red)25%,
      var(--lightsaber-light-blue),
      var(--lightsaber-blue),
      var(--lightsaber-red));
  background-size: 400%;
  border-radius: inherit;
  z-index: -2;
  filter: blur(5px);

  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  animation: rotate 15s linear infinite;

  @media (prefers-reduced-motion: reduce) {
    animation: none;
    transition: none;
  }

  @media(max-width:500px) {
    content: '';
    position: absolute;
    width: 20rem;
    height: 6rem;

    animation: rotate 15s linear infinite;
  }

  @media (max-width:1000px) {
    content: '';
    position: absolute;
    width: 20rem;
    height: 6rem;

    animation: rotate 15s linear infinite;
  }
}

main>section:nth-of-type(2)>div>a::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--black-color);
  border-radius: inherit;
  z-index: -1
}

main>section:nth-of-type(2)>div>a:hover::before,
main>section:nth-of-type(2)>div>a:focus::before,
main>section:nth-of-type(2)>div>a:active::before {
  opacity: 1;
}

@keyframes rotate {
  0% {
    background-position: 0 0;
  }

  50% {
    background-position: 400% 0;
  }

  100% {
    background-position: 0 0;
  }
}

/**************************
* MARK: lightside- lightsaber section
**************************/
main>section:nth-of-type(3) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  position: relative;
  width: 100%;
  padding: 5rem;
  overflow-x: clip;
  gap: 2rem;

  @media(max-width:1000px) {
    padding: 3rem 2rem;
  }

  @media(max-width:500px) {
    grid-template-columns: 1fr;
    padding: 2rem 1rem;
    gap: 5rem;
  }
}

/*  huyang image  */
main>section:nth-of-type(3)>picture {
  grid-column: 1;
  grid-row: 1;
  display: block;
  width: 90%;
  justify-self: start;
  rotate: 5deg;
  z-index: 2;

  img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
  }

  @media(max-width:1000px) {
    width: 95%;
    rotate: 3deg;
  }

  @media(max-width: 500px) {
    grid-column: 1;
    grid-row: 2;
    width: 80%;
    max-width: 280px;
    justify-self: center;
    rotate: 0deg;
  }
}

/* Build a lightsaber*/
main>section:nth-of-type(3)>h2 {
  grid-column: 2;
  grid-row: 1;
  font-family: "Deathstar", sans-serif;
  font-size: var(--h1);
  letter-spacing: 0.5rem;
  color: var(--text-color);
  justify-self: center;
  text-align: center;
  max-width: 35rem;
  z-index: 2;

  @media (max-width: 1000px) {
    font-size: var(--h2);
    letter-spacing: 0.3rem;
    max-width: 25rem;
  }

  @media(max-width:500px) {
    grid-column: 1;
    grid-row: 1;
    text-align: center;
    font-size: var(--h2);
    letter-spacing: 0.2rem;
    max-width: 100%;
  }
}

main>section:nth-of-type(3)>a {
  background-color: var(--black-color);
  color: var(--starwars-yellow);
  width: 20rem;
  height: 5rem;

  position: relative;
  z-index: 1;

  display: grid;
  place-items: center;
  border-radius: 2.5rem;

  font-family: 'Montserrat';
  font-weight: 600;
  font-size: var(--p);
  text-align: center;

  text-decoration: none;
  text-transform: uppercase;


  @media(max-width:500px) {
    width: 19rem;
    height: 5rem;
    display: grid;
    place-items: center;
    border-radius: 2.5rem;
    text-align: center;
  }

  @media (max-width:1000px) {
    width: 19rem;
    height: 5rem;
    display: grid;
    place-items: center;
    border-radius: 2.5rem;
    text-align: center;
  }
}

main>section:nth-of-type(3)>a::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  background: linear-gradient(to right,
      var(--lightsaber-red)25%,
      var(--lightsaber-light-blue),
      var(--lightsaber-blue),
      var(--lightsaber-red));
  background-size: 400%;
  border-radius: inherit;
  z-index: -2;
  filter: blur(5px);

  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  animation: rotate 15s linear infinite;

  @media (prefers-reduced-motion: reduce) {
    animation: none;
    transition: none;
  }

  @media(max-width:500px) {
    content: '';
    position: absolute;
    width: 20rem;
    height: 6rem;

    animation: rotate 15s linear infinite;
  }

  @media (max-width:1000px) {
    content: '';
    position: absolute;
    width: 20rem;
    height: 6rem;

    animation: rotate 15s linear infinite;
  }
}

main>section:nth-of-type(3)>a::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--black-color);
  border-radius: inherit;
  z-index: -1
}

main>section:nth-of-type(3)>a:hover::before,
main>section:nth-of-type(3)>a:focus::before,
main>section:nth-of-type(3)>a:active::before {
  opacity: 1;
}

@keyframes rotate {
  0% {
    background-position: 0 0;
  }

  50% {
    background-position: 400% 0;
  }

  100% {
    background-position: 0 0;
  }
}


/* Container voor de 8 kristallen (bedekt de hele sectie voor de percentages) */
main>section:nth-of-type(3)>div {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* De 8 zwevende kyberkristallen zelf */
main>section:nth-of-type(3)>div>div {
  position: absolute;
  z-index: 1;
  width: clamp(2.5rem, 5vw, 4.5rem);
  pointer-events: none;
  transform-origin: top center;

  img {
    width: 100%;
    height: auto;
    display: block;

    transform: translatey(0px);
    animation: float 6s ease-in-out infinite;
  }

  @media(max-width:1000px) {
    width: clamp(2rem, 4vw, 3rem);
  }

  @media(max-width:500px) {
    width: 2.2rem;
    opacity: 0.75;
  }
}

@keyframes float {
  0% {
    transform: translatey(0px);
  }

  50% {
    transform: translatey(-20px);
  }

  100% {
    transform: translatey(0px);
  }
}

/* 1. Zwart */
main>section:nth-of-type(3)>div>div:nth-of-type(1) {
  top: 4%;
  left: 6%;
  width: 123px;
  height: 223px;
  transform: rotate(277deg);

  img {
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.8));
  }

  @media (max-width: 1000px) {
    scale: 0.7;
    top: -2%;
    left: 2%;
  }

  @media (max-width: 500px) {
    top: 0%;
    left: 5%;
  }
}

/* 2. Rood */
main>section:nth-of-type(3)>div>div:nth-of-type(2) {
  top: 38%;
  right: 5%;
  width: 171px;
  height: 310px;
  transform: rotate(-25deg);

  img {
    filter: drop-shadow(0 0 5px var(--lightsaber-red));
  }

  @media (max-width: 1000px) {
    scale: 0.7;
    top: 5%;
    right: 3%;
  }

  @media (max-width: 500px) {
    scale: 0.45;
    top: 20%;
    right: 1%;
    opacity: 0.7;
  }
}

/* 3. Wit */
main>section:nth-of-type(3)>div>div:nth-of-type(3) {
  top: 48%;
  left: 62%;
  width: 90px;
  height: 163px;
  transform: rotate(40deg);

  img {
    filter: drop-shadow(0 0 5px rgba(53, 51, 51, 0.9));
  }

  @media(max-width:1000px) {
    scale: 0.7;
    top: 50%;
    left: 58%;
  }

  @media(max-width:500px) {
    scale: 0.45;
    left: 5%;
    top: 20%;
  }
}

/* 4. Paars */
main>section:nth-of-type(3)>div>div:nth-of-type(4) {
  top: 5%;
  left: 52%;
  width: 163px;
  height: 295px;
  transform: rotate(31deg);

  img {
    filter: drop-shadow(0 0 5px #b026ff);
  }

  @media(max-width:1000px) {
    scale: 0.7;
    top: 1%;
    left: 50%;
  }

  @media(max-width:500px) {
    scale: 0.45;
    left: 62%;
    top: 2%;
  }
}

/* 5. Geel */
main>section:nth-of-type(3)>div>div:nth-of-type(5) {
  top: 58%;
  left: 45%;
  width: 105px;
  height: 190px;
  transform: rotate(24deg);

  img {
    filter: drop-shadow(0 0 5px var(--starwars-yellow, #FFE81F));
  }

  @media(max-width:500px) {
    scale: 0.45;
    left: 12%;
    top: 56%;
  }

  @media(max-width:1000px) {
    scale: 0.7;
    top: 56%;
    left: 28%;
  }
}

/* 6. Oranje */
main>section:nth-of-type(3)>div>div:nth-of-type(6) {
  top: 18%;
  left: 40%;
  width: 65px;
  height: 118px;
  transform: rotate(-46deg);

  img {
    filter: drop-shadow(0 0 5px #ff7700);
  }

  @media(max-width:500px) {
    scale: 0.45;
    left: 8%;
    top: 12%;
  }

  @media(max-width:1000px) {
    scale: 0.7;
    top: 18%;
    left: 36%;
  }
}

/* 7. Groen */
main>section:nth-of-type(3)>div>div:nth-of-type(7) {
  top: 10%;
  right: 8%;
  width: 124px;
  height: 223px;

  img {
    filter: drop-shadow(0 0 5px #22c55e);
  }

  @media (max-width: 1000px) {
    scale: 0.7;
    top: 2%;
    right: 4%;
  }

  @media (max-width: 500px) {
    scale: 0.45;
    top: 10%;
    left: 5%;
  }
}

/* 8. Blauw */
main>section:nth-of-type(3)>div>div:nth-of-type(8) {
  top: 35%;
  left: 47%;
  width: 90px;
  height: 163px;
  transform: rotate(-117deg);

  img {
    filter: drop-shadow(0 0 5px var(--lightsaber-light-blue, #15F2FD));
  }

  @media (max-width: 500px) {
    display:none;
  }

  @media (max-width: 1000px) {
    scale: 0.7;
    top: 36%;
    left: 44%;
  }
}

/**************************
* MARK: Lightside lightsaber tekst section
**************************/
main>section:nth-of-type(3)>section {
  grid-column: 1 /-1;
  width: 100%;
  padding: 4rem 2rem;

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

  h2 {
    text-align: center;
    font-family: 'Deathstar', sans-serif;
    font-size: var(--h2);
    letter-spacing: 0.3rem;
    color: var(--text-color);
    max-width: 50rem;
    align-self: center;
    padding-top: 10rem;
  }

  p {
    font-family: "Montserrat", sans-serif;
    font-size: var(--p);
    color: var(--text-color);
    max-width: 60rem;
    align-self: center;
    text-align: center;
    padding-bottom: 10rem;
  }

  button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    position: absolute;
    z-index: 2;

    &:focus-visible {
      outline: 3px solid var(--starwars-yellow);
      outline-offset: 6px;
      border-radius: 8px;
    }

    img {
      width: 100%;
      height: auto;
      display: block;
    }
  }
}

main>section:nth-of-type(3)>section>button:hover img {
  animation: tilt-n-move-shaking 0.25s infinite;
}

main>section:nth-of-type(3)>section button:focus-visible {
  outline: 3px solid var(--starwars-yellow);
  outline-offset: 6px;
  border-radius: 0.5rem;
}

/*   bron: https://unused-css.com/blog/css-shake-animation/ */

#lightsaber1 {
  align-self: flex-end;
  width: 25rem;

  & img {
    transform: scaleX(-1);
  }

  &::before {
    content: '';
    position: absolute;
    right: 93%;
    top: 46%;
    width: 52rem;
    height: 2.5rem;
    background: #ffffff;
    border-radius: 30px 0 0 30px;

    box-shadow:
      0 0 4px #ffffff,
      0 0 10px #ff0000,
      0 0 25px var(--lightsaber-red),
      0 0 45px rgba(255, 0, 0, 0.5);

    transform: translateY(-50%) scaleX(0);
    transform-origin: right center;
    transition: transform 0.22s cubic-bezier(0.1, 0.8, 0.2, 1);
    pointer-events: none;
  }

  &.active::before {
    transform: translateY(-50%) scaleX(1);
    animation: sith-blade-pulse 1.5s infinite alternate ease-in-out;
  }

  @media (max-width: 1000px) {}

  @media (max-width: 500px) {}

}

#lightsaber2 {
  bottom: 5%;
  left: 3%;
  width: 25rem;

  & img {
    z-index: -1;
  }

  &::after {
    content: '';
    position: absolute;
    left: 99%;
    top: 53%;
    width: 52rem;
    height: 2.5rem;
    background: #ffffff;
    border-radius: 0 30px 30px 0;

    box-shadow:
      0 0 4px #ffffff,
      0 0 10px #00d2ff,
      0 0 25px var(--lightsaber-light-blue),
      0 0 45px rgba(21, 242, 253, 0.5);

    transform: translateY(-50%) scaleX(0);
    transform-origin: left center;
    transition: transform 0.22s cubic-bezier(0.1, 0.8, 0.2, 1);
    pointer-events: none;
  }

  &.active::after {
    transform: translateY(-50%) scaleX(1);
    animation: jedi-blade-pulse 1.5s infinite alternate ease-in-out;
  }
}

@keyframes sith-blade-pulse {
  0% {
    box-shadow:
      0 0 4px #ffffff,
      0 0 10px #ff0000,
      0 0 25px var(--lightsaber-red),
      0 0 40px rgba(255, 0, 0, 0.4);
  }

  100% {
    box-shadow:
      0 0 6px #ffffff,
      0 0 16px #ff0000,
      0 0 35px var(--lightsaber-red),
      0 0 60px rgba(255, 0, 0, 0.7);
  }
}

@keyframes jedi-blade-pulse {
  0% {
    box-shadow:
      0 0 4px #ffffff,
      0 0 10px #00d2ff,
      0 0 25px var(--lightsaber-light-blue),
      0 0 40px rgba(21, 242, 253, 0.4);
  }

  100% {
    box-shadow:
      0 0 6px #ffffff,
      0 0 16px #00d2ff,
      0 0 35px var(--lightsaber-light-blue),
      0 0 60px rgba(21, 242, 253, 0.7);
  }
}

@keyframes tilt-n-move-shaking {
  0% {
    translate: 0 0;
    rotate: 0deg;
  }

  25% {
    translate: 5px 5px;
    rotate: 5deg;
  }

  50% {
    translate: 0 0;
    rotate: 0deg;
  }

  75% {
    translate: -5px 5px;
    rotate: -5deg;
  }

  100% {
    translate: 0 0;
    rotate: 0deg;
  }
}

@media (prefers-reduced-motion: reduce) {
  main>section:nth-of-type(3)>div img {
    animation: none !important;
  }

  main>section:nth-of-type(3)>section button:hover img {
    animation: none !important;
    translate: 0 0 !important;
    rotate: 0deg !important;
  }

  main section picture .yodaimg,
  main>section:nth-of-type(3)>picture img {
    animation: none !important;
    opacity: 1 !important;
    scale: 1 !important;
  }
}


@supports (animation-timeline: view()) {
  main section picture .yodaimg,
  main>section:nth-of-type(3)>picture img {
    view-timeline-name: --sketch-reveal;
    view-timeline-axis: block;
    animation-timeline: --sketch-reveal;
    animation-name: scroll-reveal;
    animation-range: entry 10% cover 35%;
    animation-fill-mode: both;
  }
  @keyframes scroll-reveal {
    from {
      opacity: 0.2;
      scale: 0.92;
    }
    to {
      opacity: 1;
      scale: 1;
    }
  }
}


/**************************
* MARK: Footer
**************************/

footer {
  background-color: var(--black-color);
  color: #f0f0f0;
  border-top: 3px solid var(--starwars-yellow);
  padding: 4rem 2rem 3rem 2rem;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.5rem;
  width: 100%;
  position: relative;
  z-index: 1;

  @media (max-width: 500px) {
    padding-bottom: 9rem;
    gap: 2rem;
  }

  h2 {
    font-family: 'Deathstar', sans-serif;
    font-size: var(--h3);
    color: var(--starwars-yellow);
    letter-spacing: 0.2rem;
    margin-bottom: 0.5rem;
  }

  p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    max-width: 40rem;
    line-height: 1.6;
    color: #cccccc;
  }

  nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    list-style: none;
    background: none;
    box-shadow: none;
    height: auto;
    width: auto;
    border-radius: 0;

    @media (max-width: 500px) {
      flex-direction: column;
      gap: 1rem;
      position: static;
      background: none;
      height: auto;
    }
  }

  nav li a {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: var(--starwars-yellow);
    text-decoration: none;
    transition: opacity 0.2s ease, text-shadow 0.2s ease;

    &:hover {
      text-decoration: underline;
      text-shadow: 0 0 8px var(--starwars-yellow);
    }

    &:focus-visible {
      outline: 2px solid var(--starwars-yellow);
      outline-offset: 4px;
    }
  }

  /* Copyright en disclaimer */
  section:last-of-type small {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    color: #888888;
    line-height: 1.4;
  }
}

/*
Bronnen:
https://codepen.io/Sixclones/pen/MJrEgz
https://codepen.io/creme/pen/XXdZjM
https://codepen.io/Aleix/pen/oWwoza
https://codepen.io/jh3y/pen/gOmObQj
*/


/**************************
* MARK: Dark side
**************************/
[data-theme="dark"],
html:has(#theme-toggle:checked) {
  body {
    background-color: var(--bg-primairy-color);
    color: var(--text-color);
    padding: 0;
    margin: 0;
  }

  main {
    background-color: var(--bg-primairy-color);
    color: var(--text-color);
  }

  header picture img {
    @media (max-width: 500px) {
      object-position: center;
    }
  }

  ul {
    background-image: linear-gradient(to right,
        var(--lightsaber-grey) 0% 30%,
        var(--lightsaber-darkred) 30% 100%);

    @media (max-width: 500px) {
      background-image: linear-gradient(to right,
          var(--lightsaber-grey) 0% 30%,
          var(--lightsaber-red) 30% 100%);
    }
  }

 header>section section{
  color:var(--black-color);
  display: grid;
  gap: 1rem;
  background-color: var(--gradient-black-overlay);
  padding: 2.5rem;
  border-radius: 1.5rem;
  backdrop-filter: blur(30px);
 }
  main section img {
    justify-content: right;
    justify-items: end;
    width: 90%;

    @media (max-width: 500px) {
      width: 100%;
      justify-content: center;
    }
  }

  main>section:nth-of-type(2)>div {
    @media (max-width: 500px) {
      background-color: var(--bg-primairy-color);
    }
  }

  main>section:nth-of-type(2)>div>section>a {
    background-color: var(--bg-secundairy-color);
  }

  main>section:nth-of-type(2)>div>section>a>h3 {
    color: var(--text-color);
    background-color: var(--black-color);
  }
}