:root {
  /* ratio */
  --ratio: 1.1;

  /* sizes */
  --s-5: calc(var(--s0) / var(--ratio) / var(--ratio) / var(--ratio) / var(--ratio) / var(--ratio));
  --s-4: calc(var(--s0) / var(--ratio) / var(--ratio) / var(--ratio) / var(--ratio));
  --s-3: calc(var(--s0) / var(--ratio) / var(--ratio) / var(--ratio));
  --s-2: calc(var(--s0) / var(--ratio) / var(--ratio));
  --s-1: calc(var(--s0) / var(--ratio));
  --s0: 1rem;
  --s1: calc(var(--s0) * var(--ratio));
  --s2: calc(var(--s0) * var(--ratio) * var(--ratio));
  --s3: calc(var(--s0) * var(--ratio) * var(--ratio) * var(--ratio));
  --s4: calc(var(--s0) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio));
  --s5: calc(var(--s0) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio) * var(--ratio));
  
  /* fonts */
  --font-serif: serif;
  --font-sans: 'Inter', sans-serif;
  --font-mono: monospace;

  /* colors */
  --color-white: hsl(0, 0%, 100%);
  --color-black: hsl(0, 0%, 0%);
}

/* --- Layout --- */

.grid {
  width: min(75rem, 100vw - 4rem);
  margin-left: auto;
  margin-right: auto;
}

ul.tags {
  display: flex;
  flex-direction: row;
  column-gap: 1rem;
}

nav.pagination .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  row-gap: 3rem;
  column-gap: 3rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  row-gap: 3rem;
  column-gap: 3rem;
  min-height: 0;
}

body.page-project > .grid {
  column-gap: 1rem;
}

body > .grid > header {
  grid-column-start: 1;
  grid-column-end: 1;
}

main {
  grid-column-start: 1;
  grid-column-end: 1;
}

footer {
  grid-column-start: 1;
  grid-column-end: 1;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  row-gap: 2rem;
  column-gap: 1rem;
}

.site-nav > * {
  flex-basis: 17rem;
}

.page-project .site-nav div:last-of-type {
  display: none;
}

.gallery #slider {
  display: flex;
  justify-content: center;
}

.gdpr {
  display: block;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: .85rem 1.5rem;
  font-size: .9em;
  box-shadow: 0 -1px 10px 0 rgba(172, 171, 171, 0.3);
}

.gdpr a {
  color: var(--color-black);
  text-decoration: underline;
}

.gdpr button {
  text-transform: uppercase;
  border: none;
  font-size: .85rem;
  padding: .75rem 1rem;
  display: inline-block;
}

.gdpr button {
  background-color: hsl(0, 0%, 12%);
  color: hsl(0, 0%, 100%);
}

@media (max-width: 600px) {
  .gdpr {
    padding-top: 1.5rem;
    padding-bottom: 1.25rem;
  }
  .gdpr button {
    margin-top: .75rem;
  }
  .cookie_message {
    max-width: 85%;
  }
}

@media (min-width: 601px) {
  .cookie_container {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
  }
}

@media (min-width: 45rem) {
.grid {
  grid-template-columns: 1.5fr 3fr;
  grid-template-rows: auto auto 1fr;
}
  
main {
  grid-column-start: 2;
  grid-column-end: 2;
  grid-row-start: 1;
  grid-row-end: -1;
}
  
.grid > header {
  position: sticky;
  top: 5.5rem;
}
  
.grid > footer {
  position: sticky;
  top: 25.5rem;
}

body.page-project > .grid {
  grid-template-columns: 2.75fr 3fr;
  grid-template-rows: auto auto 1fr;
}

nav.filter {
  display: none;
}

.page-project .site-nav {
  width: 100%;
}

.page-project footer {
  display: none;
}

.page-project .site-nav div:last-of-type {
  display: inline;
}
}

@media (min-width: 95rem) {
.back-to-top {
  position: absolute;
  top: 100vh; /* Define at what scroll lenght the button should appear */
  right: 1.5rem;
  bottom: 0;
}

.back-to-top > a {
  display: block;
  position: sticky;
  top: calc(100vh - 5rem); /* Define bottom gap */
}
}

/* --- Theme --- */

body {
  position: relative;
}

a {
  display: inline-block;
}

input,
textarea,
iframe {
  width: 100%;
}

nav.pagination a{
  border-bottom-width: 2px;
  border-bottom-style: solid;
  border-bottom-color: transparent;
}

form {
  max-width: 45ch;
}

.skip {
  margin-left: auto;
  margin-right: auto;
}

.skip {
  position: absolute;
  top: auto;
  left: -99999px;
}

.site-header nav {
  width: fit-content;
}

ul.tags li::before {
  content: "#";
}

form > div:nth-child(2) {
  position: absolute;
  left: -9999px;
}

input,
textarea {
  border: none;
  padding: .5em;
}

input[type="submit"] {
  width: fit-content;
  padding: .7em 4em;
}

.meta > span {
  display: block;
}

form span {
  display: inline-block;
}

input[type="submit"] {
  border-width: 2px;
  border-style: solid;
}

.site-header nav a {
  border-bottom-width: 2px;
  border-bottom-style: solid;
}

.splide__arrow {
  align-items: center;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  height: 2em;
  justify-content: center;
  opacity: .7;
  padding: 0;
  position: absolute;
  width: 2em;
  z-index: 1;
}

.splide__arrow svg {
  height: 1.2em;
  width: 1.5em;
}

.splide__arrow--prev {
  position: absolute;
  bottom: -4rem;
  left: 43%;
}

.splide__arrow--next {
  position: absolute;
  bottom: -4rem;
  right: 43%;
}

.splide__arrow--prev svg {
  transform: scaleX(-1);
}

.splide__arrow--prev::after,
.splide__arrow--next::before {
  content: "";
  width: 3rem;
  height: 2px;
}

.splide__arrow--prev::after {
  margin-left: -.65rem;
}

.splide__arrow--next::before {
  margin-right: -.65rem;
}

@media (min-width: 45rem) {
.gallery img:not(.page-project .gallery img) {
  width: auto;
  max-width: 100%;
  max-height: 75vh;
}

.page-error header img {
  width: auto;
  max-width: 100%;
  max-height: 40vh;
}
}

@media (prefers-reduced-motion: no-preference) {
html {
  scroll-behavior: smooth;
}
}

/* Typography */

body {
  line-height: 1.5;
  font-family: var(--font-sans);
  font-size: var(--s1);
  font-weight: 400;
}

a {
  text-decoration: none;
}

main a,
footer a {
  text-decoration: underline;
}

h1 {
  font-size: clamp(var(--s5), 4vw, var(--s5));
}

header > p {
  font-size: clamp(var(--s3), 4vw, var(--s5));
}

.site-footer svg {
  width: 1.5rem;
}

.site-header nav {
  font-weight: 600;
}

.site-header nav .site-footer {
  font-weight: 400;
  font-size: .8em;
}

.page-project .site-nav > div:last-of-type {
  font-size: .9em;
}

.page-project .site-nav .site-footer a {
  font-weight: 400;
  text-decoration: underline;
  color: hsl(0, 0%, 30%);
}

nav.pagination a {
  font-size: clamp(var(--s2), 4vw, var(--s3));
  text-decoration: none;
}

label,
.error,
.meta {
  font-size: .9em;
}

footer {
  font-size: .8em;
}

input,
textarea {
  font-size: 1rem;
}

input[type="submit"] {
  font-weight: 600;
}

.site-header nav a {
  line-height: 1.4;
}

.site-header nav a[aria-current] {
  border-bottom-color: hsl(0, 0%, 90%);
}

.type {
  font-style: italic;
}

.page-project .site-nav > div:last-of-type a {
  font-weight: normal;
  border-bottom: 0;
  color: hsl(0, 0%, 30%);
}

a[aria-current],
.site-nav ul:last-of-type a[aria-current] {
  font-weight: 600;
}

.text {
  font-size: 1rem;
}

/* Colour */

body {
  color: hsl(0, 0%, 25%);
}

a {
  color: inherit;
}

h1 {
  color: hsl(0, 0%, 40%);
}

header > p {
  color: hsl(0, 0%, 50%);
}

footer,
.page-project .site-footer {
  color: hsl(0, 0%, 30%);
}

.gdpr {
  background-color: var(--color-white);
}

.skip {
  background-color: var(--color-black);
  color: var(--color-white);
}

.site-header a,
nav.pagination a {
  color: var(--color-black);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  background-color: hsl(0, 0%, 95%);
}

input[type="submit"] {
  background-color: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

.error {
  color: red;
}

button {
  background-color: transparent;
}

.splide__arrow svg {
  fill: hsl(0, 0%, 10%);
}

.splide__arrow--prev::after,
.splide__arrow--next::before {
  background-color: hsl(0, 0%, 10%);
}

.site-header nav a {
  border-bottom-color: transparent;
}

.back-to-top svg {
  fill: hsl(0, 0%, 35%);
}

/* Spacing */

body {
  padding-top: clamp(3rem, 4vw, 15rem);
  padding-bottom: clamp(5rem, 6vw, 15rem);
}

footer {
  padding-top: 1rem;
}

.site-header .container > :last-child,
header > * + * {
  margin-top: 3rem;
}

footer .container > * + * {
  margin-top: 2rem;
}

main * + * {
  margin-top: 3rem;
}

main li + li,
nav.pagination *,
form *,
address *,
.meta *,
.gallery *,
.page-project .site-nav .site-footer li + li {
  margin-top: 0;
}

h1 {
  margin-top: clamp(1rem, 7vw, 7rem);
}

.site-nav li + li,
.error {
  margin-top: .25rem;
}

nav.pagination {
  margin-top: clamp(3rem, 4vw, 10rem);
}

h1 + * {
  margin-top: .5rem;
}

form > * + * {
  margin-top: 1.5rem;
}

* + input,
* + textarea {
  margin-top: .35rem;
}

.meta {
  margin-top: 1rem;
}

.gallery img + * {
  margin-top: 2rem;
}

.page-project .site-nav address {
  margin-top: 3.95rem;
}

.page-project .site-nav address + * {
  margin-top: 2rem;
}

.page-project .site-nav .site-footer div > :last-child {
  margin-top: 2rem;
}

/* Animation */

a:not(a:focus),
input[type="submit"],
svg,
.gdpr button {
  transition-duration: 300ms;
  transition-timing-function: ease-in-out;
}

a:hover,
button:hover {
  cursor: pointer;
}

.skip:focus {
  top: 0;
  left: 0;
  right: 0;
  width: fit-content;
  height: auto;
}

input[type="submit"]:hover {
  cursor: pointer;
  background-color: var(--color-white);
  color: var(--color-black);
}

.site-header nav a:hover {
  color: hsl(0, 0%, 40%);
}

nav.pagination a:hover {
  border-bottom-color: hsl(0, 0%, 90%);
}

.site-footer a:hover,
.page-project .site-footer a:hover,
.page-project .site-nav > div:last-of-type a:hover {
  color: var(--color-black);
}

.site-footer svg:hover {
  opacity: .5;
}

.gdpr button:hover {
  background-color: hsl(0, 0%, 20%);
}

.gdpr a:hover {
  color: inherit;
}