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

/**************************
* MARK: Fonts
**************************/

@font-face {
  font-family: "League Script, cursive";
  src: url("../type/LeagueScript-Regular.ttf");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Montserrat,sans sans-serif";
  src: url("../type/Montserrat-VariableFont_wght.ttf");
  font-weight: 300;
  font-style: normal;
}

/**************************
* MARK: Custom properties
**************************/

html {
  color-scheme: light dark;

  --color-dark: rgb(28, 27, 27);
  --color-light: #fefefe;
  --color-grey: light-dark(rgb(166, 151, 151), #cdc8c8);
  --color-kleurblok: light-dark(#fefefe, rgb(28, 27, 27));

  --color-background: light-dark(var(--color-light), var(--color-dark));
  --color-text: light-dark(var(--color-dark), var(--color-light));

  --whitespace: 2em;
  --whitespace-s: 1em;
  --whitespace-xs: 0.5em;
}

/**************************
* MARK: Algemene Styling
**************************/

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

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
  margin-block: var(--whitespace-s);
}

body {
  font-family: "Montserrat,sans sans-serif";
  margin: var(--whitespace-s);
  background-color: var(--color-background);

  display: grid;
  gap: var(--whitespace);
  grid-template-areas:
    "nav"
    "header"
    "foto"
    "start"
    "klein"
    "kleur"
    "details"
    "eindresultaat"
    "laatste"
    "tips"
    "footer";

  @media (width > 60em) {
    grid-template-columns: repeat(5, 1fr);
    grid-template-areas:
      "nav    nav    nav    nav    nav"
      "header header header  header  header"
      "foto   foto   start   start   start"
      ".   klein   klein   kleur   kleur"
      "details   details   details  .  ."
      "eindresultaat   eindresultaat   eindresultaat   laatste   laatste "
      "tips  tips  tips  tips  ."
      "footer   footer   footer   footer   footer";
  }
}

button,
summary {
  cursor: pointer;
}

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

a:hover {
  color: rgb(164, 156, 156);
}

a:focus {
  color: var(--color-grey);
  outline: 0.2em dashed aliceblue;
}

h1,
h2,
h3 {
  font-family: "League Script, cursive";
  color: var(--color-text);
}

h1 {
  font-size: 48px;
}

h2 {
  font-size: 38px;
}

h3 {
  font-size: 24px;
  font-weight: 300;
  color: var(--color-text);
}

p {
  font-size: 16px;
  color: var(--color-text);
}

/**************************
* MARK: Nav
**************************/

html:has([value="light-theme"]:checked) {
  color-scheme: light;
}

html:has([value="dark-theme"]:checked) {
  color-scheme: dark;
}

nav label {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: var(--whitespace-xs);
  padding-left: 3em;
}

nav {
  grid-area: nav;
  display: flex;
  align-items: center;
  padding: var(--whitespace-s);
  border-bottom: 1px solid var(--color-text);
}

nav p {
  font-weight: bolder;
}

nav ul {
  display: flex;
  gap: 1.5em;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}

nav a {
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-text);
}

.menu-knop {
  display: none;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
}

@media (width <= 60em) {
  .menu-knop {
    display: block;
  }

  #menu {
    display: none;
  }
}

#menu-dialog {
  margin: 1em 1em auto auto;
  width: min(90vw, 20em);
  padding: var(--whitespace);
  border: 1px solid var(--color-text);
  background-color: var(--color-background);
  color: var(--color-text);
}

#menu-dialog ul {
  display: grid;
  gap: var(--whitespace-s);
  margin: 0;
  padding: 0;
  list-style: none;
}

#menu-dialog button {
  position: static;
  display: block;
  margin: 0 0 var(--whitespace-s) auto;
}

/**************************
* MARK: Header
**************************/

header {
  grid-area: header;
  height: 40vh;
  max-width: 45em;
  justify-self: center;
  padding: var(--whitespace);
  text-align: center;
  border-bottom: 1px solid var(--color-text);
}

/**************************
* MARK: Main
**************************/
main {
  display: contents;
  img,
  article,
  aside {
    padding: var(--whitespace);
  }
}

/* MARK: Grid-areas */
main > img:nth-of-type(1) {
  grid-area: foto;
}

main > img:nth-of-type(2) {
  grid-area: klein;
}
main > img:nth-of-type(3) {
  grid-area: eindresultaat;
}
aside {
  grid-area: kleur;
}
article:nth-of-type(1) {
  grid-area: start;
}

article:nth-of-type(2) {
  grid-area: details;
}

article:nth-of-type(3) {
  grid-area: laatste;
  align-self: center;
}

article:nth-of-type(4) {
  grid-area: tips;
  align-self: center;
  background-color: var(--color-grey);
}

/* MARK: Afbeeldingen */
main img {
  width: 100%;
  align-self: start;
}

/* MARK: Artikelen */
article section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--whitespace);
}

article section p {
  margin-bottom: 0;
}

article section p:nth-child(2) {
  border-left: 1px solid var(--color-text);
  padding-left: var(--whitespace);
}

article h2 {
  line-height: 1;
  margin-bottom: 0;
}

article h3 {
  line-height: 1.2;
  margin-bottom: var(--whitespace-xs);
}

aside {
  align-self: start;
  background: var(--color-grey);
  padding: var(--whitespace);
  text-align: center;
}

aside p {
  line-height: 1.4;
  color: var(--color-kleurblok);
  margin-bottom: var(--whitespace-s);
}

article:nth-of-type(4) p {
  color: var(--color-kleurblok);
}

article:nth-of-type(4) h3 {
  color: var(--color-kleurblok);
}
/**************************
* MARK: Footer
**************************/

footer {
  grid-area: footer;
  background-color: antiquewhite;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  padding: 2em;
  color: var(--color-dark);
}
