/**************************************************
 *
 * Fonts
 *
 **************************************************/

@font-face {
  font-family: 'DM Sans';
  src: url('../media/fonts/DMSans-Regular.woff') format('woff'),
    url('../media/fonts/DMSans-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'DM Sans';
  src: url('../media/fonts/DMSansItalic.woff') format('woff'),
    url('../media/fonts/DMSans-Iatlic.woff2') format('woff2');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'DM Sans';
  src: url('../media/fonts/DMSans-Medium.woff') format('woff'),
    url('../media/fonts/DMSans-Medium.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: 'DM Sans';
  src: url('../media/fonts/DMSans-MediumItalic.woff') format('woff'),
    url('../media/fonts/DMSans-MediumIatlic.woff2') format('woff2');
  font-weight: 600;
  font-style: italic;
}

@font-face {
  font-family: 'DM Sans';
  src: url('../media/fonts/DMSans-Bold.woff') format('woff'),
    url('../media/fonts/DMSans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

/**************************************************
 *
 * Foundation
 *
 **************************************************/

html {

  /*Fonts*/
  --serif-text: serif;
  --serif-display: serif;
  --sans-medium: sans-serif;
  --sans-large: sans-serif;
  --sans-text: sans-serif;

  /*Type sizes*/
  /*Generate a typescale*/
  --fontSizex1: 1rem;
  --fontSizex2: 1.5rem;
  --fontSizex3: 2.25rem;
  --fontSizex4: 3.375rem;
  --fontSizex5: 5.0rem;
  --fontSizex6: 7.6rem;

  /*Corresponding line heights*/
  --lineHeightx1: 1.5;
  --lineHeightx2: 1.5;
  --lineHeightx3: 1.5;
  --lineHeightx4: 1.5;
  --lineHeightx5: 1.5;
  --lineHeightx6: 1.5;

  /*Colours*/
  --white: #fff;
  --dark: #121212;
  --black: #000;
  --red: #E80000;
  --cream: #FFCBA0;
  --yellow: #FBB419;
  --green: #427416;
  --cyan: #6DBFF0;
  --blue: #3C25AE;
  --purple: #700EBF;
  --pink: #FF76DA;

}

html {
  background-color: var(--dark);
  color: var(--white);
}

/**************************************************
 *
 * Resets
 *
 **************************************************/

html,
body {
  height: 100%;
}

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

* {
  margin: 0;
}

body {
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

button,
select {
  text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}

video {
  width: auto;
  height: auto;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

video:focus {
  outline: none !important;
}

[id] {
  scroll-margin-top: 15vh;
}

/**************************************************
 *
 * Base Typographic Styles
 *
 **************************************************/

body {
  font-size: 16px;
  font-family: "DM Sans", sans-serif;
}

p,
li {
  line-height: 1.6;
  letter-spacing: 0.015rem;
  margin: 0;
  hyphens: auto;
}

@media (min-width: 600px) {
  body {
    font-size: 17.5px;
    line-height: 1.55;

  }
}

b,
strong {
  font-weight: bolder;
}

section.bg {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  background-color: #000;
  color: white;
  width: 100vw;
}

section.bg>div {
  width: fit-content;
}

section.bg>div>a {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid var(--white);
  color: white;
}

/**************************************************
 *
 * Navbar
 *
 **************************************************/

nav {
  display: flex;
  flex-wrap: wrap;
  position: sticky;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  width: 100vw;
  overflow: none;
}

nav img {
  height: 1.5rem;
  user-select: none;
}

nav a:last-child {
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: rgba(255, 255, 255, 0.9);
}

#hero {
  background-image: url("../media/img/bg.jpg");
  background-repeat: no-repeat;
  background-position: top;
  background-size: cover;
  margin-bottom: 1.5rem;
  margin-top: -4rem;
}

#hero>div {
  margin-top: 8rem;
  margin-bottom: 10rem;
  width: fit-content;
}

#hero>div>h2 {
  max-width: 20ch;
  font-weight: 600;
  font-size: var(--fontSizex2);
  color: #feeacf;
  font-weight: 600;
}

@media (min-width: 550px) {
  #hero>div>h2 {
    font-weight: 400;
    font-size: var(--fontSizex4);
    line-height: 1.2;
    max-width: 20ch;
  }
}

#hero a {
  color: #ceebf6;
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-width: 2px;
  border-color: #ceebf6;
}

#hero a:hover {
  background-color: #ceebf6;
  color: #121212;
}

#grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: var(--dark);
  max-width: 1600px;
  margin: 0 auto;
}

#grid>div {
  padding: 2rem;
  border-radius: 1rem;
  display: flex;
  flex-wrap: wrap;
  min-height: 300px;
}

@media (min-width: 500px) and (max-width: 900px) {
  #grid>div {
    flex-wrap: nowrap;
  }
}

@media (min-width: 900px) {
  #grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    row-gap: 2rem;
    padding: 0 1rem;
  }
}

#grid>div>div {
  margin-top: auto;
}

@media (min-width: 500px) and (max-width: 900px) {
  #grid>div>div {
    flex-wrap: nowrap;
    margin-left: -320px;
  }
}

#grid div h3 {
  font-size: var(--fontSizex4);
  letter-spacing: -0.05rem;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 4rem;
  z-index: 2;
}

#grid div p {
  max-width: 35ch;
}

#grid>div>img {
  width: auto;
  height: auto;
  mix-blend-mode: multiply;
  max-height: 400px;
  user-select: none;
  border-radius: 0.5rem;
}

@media (min-width: 500px) and (max-width: 900px) {
  #grid>div>img {
    opacity: 0.25;
  }

}

#howto {
  margin-bottom: 1rem;
}

#yourspace {
  background-color: var(--red);
  color: var(--cream);
}

#safety {
  background-color: var(--blue);
  color: var(--cyan);
}

#dothings {
  background-color: var(--purple);
  color: var(--pink);
}

#swag {
  background-color: var(--cream);
  color: var(--red);
}

#moveup {
  background-color: var(--pink);
  color: var(--purple);
}

#profit {
  background-color: var(--cyan);
  color: var(--blue);
}

#journey {
  padding: 4rem 1rem;
}

#journey a {
  font-size: var(--fontSizex2);
}

article {
  background-color: #fff;
  color: var(--dark);
  padding: 4rem 1rem;
}

@media (prefers-color-scheme: dark) {
  article {
    background-color: var(--dark);
    color: var(--white);
    padding: 4rem 1rem;
  }
}

article div {
  max-width: 60ch;
  margin: 0 auto;
}

article h1 {
  font-weight: 600;
  max-width: 15ch;
  font-size: var(--fontSizex2);
  margin-bottom: 2rem;
}

@media (min-width: 600px) {
  article h1 {
    font-size: var(--fontSizex4);
    line-height: 1.2;
  }
}

@media (min-width: 700px) {
  article p {
    font-weight: 600;
    font-size: 1.25rem;
  }
}

article p+p {
  margin-top: 1rem;
}

footer {
  text-align: center;
  padding: 4rem 2rem 2rem 2rem;
}

footer p {
  opacity: 0.75;
}

.allcaps,
.numbers {
  letter-spacing: 0.05rem;
}