@import url("./variables.css");
@import url("./menu.css");
@import url("./gallery.css");
@import url('https://fonts.googleapis.com/css2?family=Courgette&display=swap');


/* RESETS */
body, p, h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; }
ul { margin: 0; }
img { display: block; }
* { box-sizing: border-box; }


/* TYPOGRAPHY & LAYOUT */
:root { font: 0.625em Arial, sans-serif; }
body { font-size: 1.6rem; overflow-y: scroll; }
main * + * { margin-top: 1.6rem; }
h1 { font-size: 3.2rem; }
h2 { font-size: 2.4rem; }
a { color: var(--color-primary); font-weight: bold; }


/* SITE HEADER */
#site-header {
  max-width: var(--max-width);
  margin: 0 1.6rem;
}
#site-logo { text-align: center; }
#site-logo > a { display: inline-block; }
#site-contact {
  display: grid;
  grid: auto-flow dense 1fr / 1fr auto;
  font-weight: bold;
  margin-bottom: 0.8rem;
}
#site-contact > :first-child { grid-row-end: span 2; }
#site-contact > :where(:not(:first-child)) { justify-self: end; }
#site-contact span { display: block; }

@media (min-width: 768px) {
  #site-header {
    display: grid;
    grid: auto-flow dense auto / auto 1fr;
  }
  #site-logo {
    grid-column-start: 2;
    justify-self: right;
    align-self: center;
  }
  #site-contact {
    grid: auto-flow dense auto / 1fr;
    row-gap: 0.8rem;
    align-content: center;
    margin-bottom: 0;
  }
  #site-contact > * { justify-self: start; }
  #site-contact > :first-child { grid-area: 2 / 1 / 3 / 2; }
}

@media (min-width: 992px) {
  #site-header { margin: 0 auto; }
}

#site-subheader {
  text-align: center;
  font-weight: bold;
  background-color: var(--color-primary);
  color: var(--color-highlight);
  padding: 1.6rem;
}


/* MAIN ARTICLE */
.article__header {
  padding: 256px 0 1.6rem 0;
  position: relative;
}
.article__header > img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  z-index: -1;
}
.article__header > :not(img),
.article__content {
  max-width: var(--max-width);
  margin-left: 1.6rem;
  margin-right: 1.6rem;
}
.article__header > :not(img) {
  text-align: center;
  color: var(--color-highlight);
  padding: 1.6rem;
  margin: 0 1.6rem;
}
.article__header > h1 {
  background-color: var(--color-primary-background);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  font-family: 'Courgette', cursive;
}
.article__header > p {
  background-color: var(--color-secondary-background);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  font-weight: bold;
}
.article__header { position: relative; }

@media (min-width: 992px) {
  .article__header > :not(img),
  .article__content {
    margin-left: auto;
    margin-right: auto; 
  }
}

.article__content > section > img {
  --shadow-offset-x: var(--shadow-offset);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-offset-x) var(--shadow-offset) var(--shadow-radius) var(--color-secondary);
  margin: 1.6rem auto 0 auto;
}
.article__content > section > .content > h2 { font-family: 'Courgette', cursive; }
.article__content > section > .content > ul > li { margin-top: 0; }

@media (min-width: 768px) {
  .article__content > section {
    display: grid;
    grid: auto-flow dense / 1fr 1fr;
    gap: 1.6rem;
  }
  .article__content > section > img { margin: 0 auto; }
  .article__content > section:nth-of-type(even) > img { --shadow-offset-x: calc(var(--shadow-offset) * -1); }
  .article__content > section:nth-of-type(even) > .content { grid-column-start: 2; }    
}


/* FOOTER */
footer {
  display: flex;
  justify-content: center;
  background-color: var(--color-secondary);
  color: var(--color-highlight);
  font-weight: bold;
  padding: 1.6rem 0;
  margin: 1.6rem 0 0 0;
}
footer a { color: var(--color-highlight); }


/* ASIDE */
aside {
  background-color: var(--color-primary);
  color: var(--color-highlight);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-offset) var(--shadow-offset) var(--shadow-radius) var(--color-secondary);
  font-weight: bold;
  font-size: 2rem;
  text-align: center;
  padding: 1.6rem;
}
aside a { color: var(--colour-highlight); }
