:root {
  --button-default-bg: #1b2049;
  --button-default-txt: #c4c2d5;
  --button-hover-txt: #f3f3f7;
  --button-hover-bg: #10132c;
  /* set to #FCF6C2 with JS */
  --title-color-space: #ceb8a0;
  --title-color-winter: #fff;
  --container-padding: 0 10vw;
  /* set to rgba(21, 10, 18, 0) with JS */
  --container-bg-space: rgba(21, 10, 18, 0);
  /* toggle bg with JS */
  --container-bg-winter: linear-gradient(
    to top,
    rgba(31, 46, 67, 0) 0%,
    rgba(32, 47, 68, 0) 1%,
    rgba(69, 103, 150, 0) 56%,
    rgba(91, 123, 168, 0) 94%,
    rgba(91, 123, 168, 0) 100%
  );
  /* set to  6px 6px 13px rgba(0, 0, 0, 0.89) with JS */
  --text-shadow-space: 0 0 0 0 rgba(0, 0, 0, 0);
  /* set to  0.2vw 0.2vw 0 rgba(0, 0, 0, 0.86) with JS */
  --text-shadow-winter: 0.2vw 0.2vw 0 rgba(0, 0, 0, 0);
  /* set to end with JS */
  --position-winter: center;
  font-family: "IBM Plex Sans";
  font-size: 18px;
}

/* white gredient for winter

linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 1%, rgba(255, 255, 255, 0.44) 56%, rgba(255, 255, 255, 0.06) 94%, rgba(255, 255, 266, 0) 100%)

*/

body {
  /* set background image behaviour regardless of the bg image used */
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  padding: 0;
  margin: 0;
}

body.space {
  /* set background if I'm on the space page */
  background-color: #150a12;
  background-image: url(./assets/galaxy-3608029_1920.png);
}

body.winter {
  /* set background if I'm on the space page */
  background-color: #d1daf6;
  background-image: url(./assets/snow-3193865_1920.png);
}

.container {
  /* push footer to bottom of the page regardless of screen size */
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body.space .container {
  /* overlay for bg image, initial value is 0 and changes with JS */
  background-color: var(--container-bg-space);
}

body.winter .container {
  /* overlay for bg image, initial value is 0 and changes with JS */
  background: var(--container-bg-winter);
}

.content-wrapper {
  /* align text vertically */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 75vh;
}

body.winter .content-wrapper {
  align-items: var(--position-winter);
  transition: transform 0.5s ease;
  transform: translateY(var(--position-offset, 0));
}
main {
  /* set positioning of main */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--container-padding);
}

main > * {
  /* control height of typography for immediate children of main */
  margin: 0;
  line-height: 1.15;
}

body.space main h1 {
  color: var(--title-color-space);
  font-size: clamp(1.5rem, 20vw, 20vw);
}

body.winter main h1 {
  color: var(--title-color-winter);
  font-size: clamp(1.5rem, 12.5vw, 12.5vw);
}

body.space main h1,
body.space main p {
  text-shadow: var(--text-shadow-space);
}

body.winter main h1,
body.winter main p {
  text-shadow: var(--text-shadow-winter);
}

main p {
  color: #fff;
}

body.space main p {
  padding-left: 2vw;
  font-size: clamp(1rem, 8.35vw, 8.35vw);
}

body.winter main p {
  color: var(--title-color-winter);
  padding-left: 2.15vw;
  font-size: clamp(1rem, 5.28vw, 5.28vw);
  margin-top: -0.5em;
}

footer {
  padding: 0.556rem;
  text-align: center;
  padding: var(--container-padding);
}

button {
  margin: 1rem 0;
  background-color: var(--button-default-bg);
  color: var(--button-default-txt);
  border: 0.111rem solid var(--button-default-bg);
  border-radius: 0.444rem;
  padding: 0.667rem 1.333rem;
  cursor: pointer;
  /* smooth the animation when buttons change colour */
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
  outline: none;
  box-shadow: 0 0.222rem 0.556rem rgba(0, 0, 0, 0.2);
  font-size: 1rem;
}

/* spacing between buttons, no margin on last button */
button:not(:last-child) {
  margin: 0 1em 0 0;
}

/* Hover effects */
button:hover {
  background-color: var(--button-hover-bg);
  color: var(--button-hover-txt);
  transform: translateY(-0.167rem);
  box-shadow: 0 0.444rem 0.833rem rgba(0, 0, 0, 0.25);
}

/* Active button effect */
button:active {
  transform: translateY(0.056rem);
  box-shadow: 0 0.222rem 0.444rem rgba(0, 0, 0, 0.2);
}

/* Focus styles for accessibility */
button:focus {
  outline: 0.167rem solid var(--button-hover-txt);
  outline-offset: 0.222rem;
}

@media (max-width: 45em) {
  footer {
    margin: 2em calc(50% - 50vw) 0;
    padding: 1rem 0;
    background-color: var(--button-default-bg);
  }

  button {
    border-radius: 0;
    display: block;
    width: 100%;
  }

  button:hover {
    transform: none;
  }

  button:not(:first-child):not(:last-child) {
    margin: 0.2em 0;
  }
}
