:root {
  /* Still water blue */
  --still-water-blue: #178787;

  /* Wave Blue */
  --wave-blue: #03045e;
  /* Island Sky */
  --island-sky: #0f8ed8;
  /* Sun Yellow */
  --sun-yellow: #ffb703;

  /* Button*/
  --Button-color: #0d161c;

  --checkbox-size: 28px;
  --font-color: #555;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Rubik", sans-serif;
  color: #333;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: "Raleway", sans-serif;
  line-height: 1.2;
  /* margin: 0.5em 0 0.5em; */
  font-weight: 700;
}

h1 {
  color: var(--wave-blue);
  font-size: 3.5em;
}

h2 {
  color: var(--still-water-blue);
  font-size: 2.5em;
}
h3 {
  color: #ffb703;
  font-size: 2em;
  /* margin: 0; */
}

section {
  align-self: center;
  max-width: 70rem;
  padding: 0 1rem;
}
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

figure {
  margin: 1rem 0;
}
ul {
  padding: 1rem;
}
dt {
  font-weight: bold;
}
article {
  padding: 1rem;
  margin: 3rem 0 3rem;
}
aside h2 {
  color: #fff;
}
aside {
  background-color: var(--island-sky);
  color: #fff;
  text-align: center;
  margin: 1rem 0 1rem 0;
  font-size: 2rem;
}

.button {
  background-color: var(--Button-color);
  color: #fff;
  font-weight: bold;
  font-size: 1.2rem;
  padding: 0.5em 3em;
  transition: background-color 1000ms ease, color 1000ms ease;
}

.button:hover {
  background-color: var(--wave-blue);
  color: #fff;
  border-radius: 24px;
  transform: scale(1.2);
  cursor: pointer;
  text-decoration: none;
}

.form img {
  width: 200px;
}
dl {
  padding: 1.5rem;
  margin: 0;
}
dt,
dd {
  padding: 0.5rem;
  margin: 0;
}

.hero {
  height: 100vh;
  position: relative;
}

.hero .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero h1 {
  font-size: clamp(1rem, 0.3704rem + 5.7037vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  padding: 1rem 1rem 2rem;
  margin: 0;

  color: #555;
  mix-blend-mode: difference;
}

footer {
  margin: auto;
}
video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

img {
  width: 100%;
  display: block;
  height: auto;
}
picture img {
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 1.5rem 0.5rem 1.5rem 0.5rem;
}
article img {
  /* width: auto; */
  border-radius: 12px;
}

.card {
  position: relative;
}

.card img {
  border-radius: 12px;
}

.card .overlay {
  color: #fff;
  background-color: rgba(0, 0, 0, 0.4);
  font-size: 4rem;
  line-height: 0.5s;
  padding: 5% 0.5rem 0;
  border-radius: 12px;
  margin: 0;

  opacity: 0;

  transition: opacity 300ms ease-in-out;
}

.card:hover .overlay {
  opacity: 1;
}

.form img {
  width: 400px;
}
.header {
  display: block;
}
.form {
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader {
  position: relative;
  border-radius: 15%;
  width: 8rem;
  height: 8rem;
  border: 16px solid rgba(82, 76, 179, 0.4);
  border-left: 16px solid #0c08fa9a;
  animation: load 3000ms infinite ease-in-out;
}

article a {
  white-space: nowrap;
}
.main-menu .menu-icon {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  width: 60px;
  height: 60px;
  background-color: blue;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 2;
}

.main-menu svg {
  stroke: ivory;
  stroke-width: 4px;
  stroke-linecap: round;
  padding: 12px;
}

.main-menu svg line {
  transform-origin: center;
  transition: transform 200ms ease;
}

.main-menu svg line:first-child {
  transform: translateY(8px);
}

.main-menu svg line:last-child {
  transform: translateY(-8px);
}

.menu-show .menu-icon {
  background-color: rgb(7, 8, 1);
}

.menu-show svg line {
  stroke: greenyellow;
  stroke-width: 5px;
}

.menu-show svg line:first-child {
  transform: rotate(135deg);
}

.menu-show svg line:last-child {
  transform: rotate(-135deg);
}

nav {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--sun-yellow);
  justify-content: center;
  transform: translate(-100vw);
  transition: transform 200ms ease;
  z-index: 1;
}
.menu-show nav {
  transform: translate(0);
}
nav ul {
  display: flex;
  flex-direction: column;
  list-style-type: none;
  margin: 0 auto;
  padding: 0;
  max-width: 80rem;
  justify-content: center;
}

nav a {
  display: block;
  padding: 1rem;
  font-size: 1.4rem;

  color: var(--wave-blue);
}
@keyframes load {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

nav ul {
  display: flex;
  justify-content: center;

  list-style-type: none;
  padding: none;
  margin: 0;
}

nav li a {
  display: block;
  text-decoration: none;
  cursor: pointer;
  margin: 0 2rem;
  font-size: 3rem;
  white-space: nowrap;
  user-select: none;
}

nav a::after {
  content: "";
  width: calc(100% + 30px);
  height: 3px;
  display: block;
  background-color: black;
  /* margin-top: 12px; */
  margin-left: -15px;
  transform: scale(0);
  transition: transform 400ms ease;

  transform-origin: right;
}

nav a:hover::after {
  transform: scale(1);

  transform-origin: left;
}

.panel {
  display: flex;
  flex-direction: column;
}
.panel .image-wrap {
  order: -1;
  margin-bottom: 2rem;
}

.panel h2 {
  margin-top: 0;
}
aside svg {
  margin-left: 2rem;
}

@media (min-width: 560px) {
  .cards {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .card {
    flex: 1 1 40%;
  }
  .card .overlay {
    font-size: 3rem;
  }

  p {
    font-size: 1.3rem;
  }
  dl {
    font-size: 1.3rem;
  }
  ul {
    font-size: 1.3rem;
  }
  aside p {
    font-size: 3rem;
  }
  nav {
    position: static;
    display: block;
    background-color: transparent;
    transition: none;
    transform: none;
    margin: 2rem 1.5rem 2rem;
  }

  nav ul {
    flex-direction: row;
    justify-content: space-around;
    margin: 0 auto;
    max-width: 80rem;
  }

  nav a {
    display: block;
    padding: 1rem;
    font-size: 1.4rem;
    color: var(--sun-yellow);
  }

  nav a:not([href]) {
    color: var(--still-water-blue);
  }
  nav a::after {
    content: "";
    display: block;
    width: calc(100% + 12px);
    height: 3px;
    margin-left: -6px;
    margin-top: 6px;
    background-color: var(--still-water-blue);
    transform: scale(0);
    transition: transform 200ms ease-in, color 300ms ease-in;
    transform-origin: right;
  }

  nav a[href]:hover {
    color: var(--still-water-blue);
  }

  nav a[href]:hover::after {
    transform: scale(1);
    transform-origin: left;
  }

  .main-menu .menu-icon {
    display: none;
  }
}

@media (min-width: 750px) {
  .panel {
    flex-direction: row;
  }
  .panel .image-wrap {
    order: 0;
    margin-bottom: 0;
    flex: 1 1 50%;
  }
  .panel .text-wrap {
    flex: 1 1 50%;
  }
  .panel .left {
    order: -1;
    margin-right: 2rem;
  }

  .panel h2 {
    margin-top: 0;
  }
  .panel img {
    height: 100%;
    object-fit: cover;
  }
}
@media (min-width: 900px) {
  .cards {
    flex-wrap: nowrap;
    max-width: 1600px;
    align-self: center;
  }

  .card {
    flex: 1 1 0;
    margin-bottom: 0;
    margin-right: 1rem;
  }
  .card .overlay {
    font-size: 1.8rem;
  }
  p {
    font-size: 1.5rem;
  }
  dl {
    font-size: 1.4rem;
  }
  ul {
    font-size: 1.4rem;
  }
  aside p {
    font-size: 4rem;
  }
}

@media (min-width: 1100px) {
  .panel .image-wrap {
    flex: 1 1 40%;
  }

  .panel .text-warp {
    flex: 1 1 60%;
  }
}

/* Code for grid from */

.formbackgroundcolor {
  background-color: var(--still-water-blue);
}
.form-svg {
  margin: auto;
}
.h1form {
  text-align: center;
}
.form section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 0 1rem;
}

form {
  display: grid;
}

fieldset {
  display: grid;
  grid-template-columns: min-content 1fr;
  grid-column-gap: 0.5rem;
  grid-row-gap: 0.8rem;

  border: none;
  margin: 0;
  padding: 0;
}

legend {
  grid-column: 1 / span 2;
  margin-bottom: 1rem;
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: var(--checkbox-size);
  height: var(--checkbox-size);
  border: 2px solid var(--font-color);
  border-radius: 6px;

  transition: background-color 300ms, border-color 300ms, box-shadow 300ms;
}

input[type="checkbox"]:hover,
input[type="checkbox"]:focus {
  border: 2px solid var(--sun-yellow);
  box-shadow: 0 0 2px var(--sun-yellow);
  outline: none;
}

input[type="checkbox"]:checked {
  border-color: var(--sun-yellow);
}

input[type="checkbox"]:checked:hover,
input[type="checkbox"]:checked:focus {
  border: 2px solid var(--font-color);
  box-shadow: 0 0 3px var(--font-color);
  outline: none;
}

input[type="checkbox"]:checked {
  background-color: var(--sun-yellow);
}

input[type="checkbox"]:checked::after {
  content: "";
  display: block;
  position: absolute;
  top: 4px;
  right: 8px;
  width: calc(var(--checkbox-size) / 4);
  height: calc(var(--checkbox-size) / 2);
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(38deg);
}

input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: var(--checkbox-size);
  height: var(--checkbox-size);
  border: 2px solid var(--font-color);
  border-radius: 18px;
  position: relative;
}

input[type="radio"]:checked {
  border: 2px solid var(--sun-yellow);
}
input[type="radio"]:checked::after {
  content: "";
  display: block;
  position: absolute;
  width: calc(var(--checkbox-size) - 4px);
  height: calc(var(--checkbox-size) - 4px);
  transform: scale(0.8);
  background-color: var(--sun-yellow);
  border-radius: 18px;
}

/* add spacing below elements  */
form > input,
textarea,
fieldset,
button {
  margin-bottom: 1.5rem;
}

.form button {
  justify-self: center;
  border: 1px solid var(--Button-color);
  color: var(--Button-color);
  font-size: 0.8rem;
  padding: 0.3rem 0.5rem;
  transition: background-color 300ms;
}

.form button:hover {
  background-color: var(--wave-blue);
  color: #fff;
}

/* hover */
input:hover,
input:focus {
  background-color: lightyellow;
}

input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px black;
  outline: 2px solid var(--sun-yellow);
}

.form section img {
  min-width: 100px;
  max-width: 300px;
}
@media (min-width: 500px) {
  .form-svg {
    margin: 0;
  }
  form {
    grid-template-columns: max-content 1fr;
    grid-column-gap: 0.5rem;

    align-items: center;
  }

  .form form > input {
    margin: 0.5rem 0;
  }

  .form form > label {
    justify-self: end;
  }

  .form label[for="text-field"] {
    justify-self: start;
  }

  form > fieldset,
  label[for="text-field"],
  textarea,
  button {
    grid-column-start: 2;
  }

  .form button {
    justify-self: start;
  }
  .form section {
    max-width: 50rem;
  }
}

@media (min-width: 700px) {
  .form section {
    flex-direction: row;
    align-items: flex-start;
  }

  .form section img {
    flex: 0 1 30%;
  }

  .form section form {
    flex: 1 1 70%;
  }
}
