@font-face {
  /* Literata (libre font by womxn) by Veronika Burian, Irene Vlachou, Vera
  Evstafieva and Jose Scaglione (TypeTogether) is a contemporary serif typeface
  family designed for long-form reading especially in eBooks. */
  font-family: 'Literata';
  src: url('/assets/type/literata.woff2');
}

:root {
  --dune-900: #040302;
  --dune-775: #1e1813;
  --dune-675: #3d332a;
  --dune-550: #605143;
  --dune-450: #826f5c;
  --dune-325: #a99078;
  --dune-225: #d9c5b2;
  --dune-100: #e7dcd2;
  --dune: var(--dune-225);

  --purple-900: #050303;
  --purple-775: #231519;
  --purple-675: #3b252c;
  --purple-550: #6c4853;
  --purple-450: #936372;
  --purple-325: #ba8394;
  --purple-225: #d0afb8;
  --purple-100: #e7dade;
  --purple: var(--purple-675);

  --green-900: #030401;
  --green-775: #151d07;
  --green-675: #2e3b14;
  --green-550: #41521f;
  --green-450: #657d33;
  --green-325: #83a245;
  --green-225: #a3c959;
  --green-100: #c7ef7d;
  --green: var(--green-550);

  --orange-900: #0a0100;
  --orange-775: #320a01;
  --orange-675: #611900;
  --orange-550: #932b01;
  --orange-450: #c63c00;
  --orange-325: #f24c00;
  --orange-225: #fe9b7d;
  --orange-100: #fbd4c9;
  --orange: var(--orange-325);

  --black-900: #030303;
  --black-775: #141414;
  --black-675: #353535;
  --black-550: #545454;
  --black-450: #737373;
  --black-325: #959595;
  --black-225: #b9b9b9;
  --black-100: #dedede;
  --black: var(--black-775);

  --white: #fafafa;

  --gap: 0.5rem;
}

/* Reset by Josh Comeau */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}
input,
button,
textarea,
select {
  font: inherit;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* Basics */
html,
body {
  min-height: 100%;
  scroll-behavior: smooth;
}

html,
main img {
  background-color: var(--bg-fg);
  background-image: linear-gradient(var(45deg), var(--dune) 20%, var(--dune-325) 100%);
}

body {
  font-family: 'Literata', serif;
  font-optical-sizing: auto;
  font-variant-numeric: oldstyle-nums;
  font-weight: 400;
  line-height: 1.5;
  color: var(--black);
}

h1,
h2,
h3,
h4 {
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.3;
  font-variant-ligatures: discretionary-ligatures;
}

h1 {
  font-size: 2rem;
}

p {
  margin-bottom: 0.75em;
  text-wrap: pretty;
  max-width: 30rem;
}

a {
  font-family: inherit;
  color: inherit;
}

sup {
  font-size: inherit;
  vertical-align: baseline;
  font-variant-position: super;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}

table.prices {
  font-variant-numeric: tabular-nums slashed-zero;
  margin: var(--gap) 0;
  text-align: left;

  & th {
    width: fit-content;
  }
  & th span,
  & td.small {
    font-weight: normal;
    font-size: 0.8rem;
  }
  & td.price {
    white-space: nowrap;
  }
}

p.conditions {
  font-weight: normal;
  font-size: 0.8rem;
}

details {
  margin: var(--gap) 0;
  padding: var(--gap);
  border-radius: var(--gap);
  background: var(--color);
  color: var(--background);
  max-width: 30rem;

  & summary {
    font-weight: bold;
  }

  & ul {
    padding: 1rem;

    & li::marker {
      font-size: 0.7rem;
    }
  }

  & iframe {
    margin-top: var(--gap);
    border-radius: var(--gap);
  }
}

div.controls {
  position: relative;
  z-index: 43;
  display: grid;
  place-items: center;

  & div {
    display: flex;
    padding: 0.2rem;
    width: fit-content;
    flex-flow: row nowrap;
    justify-content: center;
    border-radius: 0.5rem;
    gap: 0.2rem;
    background: var(--color);
    opacity: 0.7;

    & button {
      background: var(--background);
      border: 0;
      font-size: 0;
      width: 0.6rem;
      height: 0.6rem;
      border-radius: 50%;
      cursor: pointer;

      &.active {
        background: var(--orange);
      }
    }
  }
}

/* HEADER */
header {
  display: contents;

  & img {
    position: fixed;
    padding: var(--gap);
    min-width: 4rem;
    width: 9vw;
    z-index: 99;
  }
}

section {
  padding: calc(var(--gap) * 2);
  background: var(--background, var(--dune));
  color: var(--color, var(--black));
}

/* HERO */
section#hero {
  position: relative;
  padding: 0;
  min-height: 60vw;
  overflow: clip;

  & picture {
    position: absolute;
    object-position: center;
    object-fit: cover;

    & img {
      width: 100%;
    }

    animation: fader 30s linear infinite;
    opacity: 1;

    &:nth-child(1) {
      z-index: 3;
    }
    &:nth-child(2) {
      animation-delay: 10s;
      z-index: 2;
    }
    &:nth-child(3) {
      animation-delay: 20s;
      z-index: 1;
    }
  }
}
@keyframes fader {
  0% {
    opacity: 1;
  }
  33% {
    opacity: 1;
  }
  35% {
    opacity: 0;
  }
  98% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* HOTEL B&B */
section#hotel-bed-and-breakfast {
  --background: var(--purple);
  --color: var(--dune);
}

/* GROEPSACCOMODATIE */
section#groepsaccommodatie {
  --background: var(--green-675);
  --color: var(--dune);
}

/* KAMERS */
section#onze-kamers {
  --background: var(--purple);
  --color: var(--dune);
}

/* OMGEVING */
section#de-omgeving {
  display: grid;
  gap: var(--gap);

  & article {
    border-radius: var(--gap);
    padding: calc(2 * var(--gap));
    color: var(--dune);
  }
  & article:nth-child(odd) {
    background: var(--green-675);
  }
  & article:nth-child(even) {
    background: var(--purple);
  }
}

/* FOOTER */
footer {
  position: sticky;
  width: 100vw;
  height: 20rem;
  bottom: -16rem;
  left: 0;
  right: 0;
  background: var(--green-900);
  color: var(--white);
  z-index: 42;

  & nav {
    background: var(--green);
    padding-right: var(--gap);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--gap);
    height: 4rem;

    & ul,
    & li {
      display: contents;
    }
    & li:first-of-type a {
      display: flex;
      align-items: center;
      background: var(--orange);
      border-radius: var(--gap);
      text-decoration: none;
      padding: var(--gap);

      & svg {
        margin-left: calc(var(--gap) / 2);
        background: var(--orange);
        margin-bottom: -0.2rem;
      }

      & span {
        text-transform: uppercase;
        font-feature-settings: 'c2sc' on;
        font-size: 1.1rem;
      }
    }
  }

  /* Directions */
  & .directions {
    background: var(--black);
    color: var(--dune);
    padding: calc(var(--gap) * 2);

    & .address {
      & h2,
      & p {
        margin-bottom: var(--gap);
      }
      & p {
        max-width: 14rem;
      }
      & .org {
        font-weight: bold;
      }
      & .adr {
        margin-bottom: var(--gap);
      }
    }

    & .map {
      display: none;
    }
  }
}

/* Mobile */
@media (max-width: 34rem) {
  header nav {
    display: none;

    & ul {
      padding: 0;
      display: flex;
      flex-flow: column nowrap;
      list-style: none;
    }
    & a {
      display: block;
      padding: var(--gap);
      text-decoration: none;
      font-weight: 600;
      font-size: 1.2rem;
    }
  }

  div.deck {
    max-width: 100%;
    display: flex;
    gap: calc(var(--gap) * 2);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    counter-reset: picture;
    position: relative;

    & article {
      display: contents;
    }
    & h3,
    & p {
      display: none;
    }
    & picture {
      flex: 0 0 100%;
      scroll-snap-align: center;
      counter-increment: picture;
      position: relative;
    }

    /* hide scrollbars where possible */
    -ms-overflow-style: none;
    scrollbar-width: none;
    &::-webkit-scrollbar {
      display: none;
    }
  }

  div.controls {
    top: calc(var(--gap) * -3);

    & button.article {
      display: none;
    }
  }
}

/* Tablet */
@media (min-width: 34.01rem) {
  header nav {
    display: none;
    position: fixed;
    width: 100vw;
    height: 1rem;
    padding: var(--gap);
    z-index: 99;

    & ul {
      display: flex;
      flex-flow: row wrap;
      justify-content: end;
      gap: var(--gap);
      list-style: none;

      & a {
        text-decoration: none;
        font-weight: bold;
      }
    }
  }

  footer nav {
    padding-right: calc(var(--gap) * 3);
  }

  main,
  article.slide,
  footer div.directions {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-column-gap: var(--gap);
  }

  main {
    & > section {
      display: grid;
      grid-template-columns: subgrid;
      grid-column: 1 / -1;
      grid-row-gap: calc(var(--gap) * 8);
      padding: calc(var(--gap) * 8) 0;

      & > * {
        grid-column: 1 / -1;
      }

      /* decks */
      & > div.deck {
        display: flex;
        flex-flow: row nowrap;
        gap: calc(var(--gap) * 2);
        overflow-x: auto;
        scroll-snap-type: x mandatory;

        & article.slide {
          flex: 0 0 100%;
          scroll-snap-align: center;
          grid-row-gap: var(--gap);

          picture,
          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
          }
          /* Bring these to individuel slides */
          & :nth-child(1) {
            grid-column: 2 / 6;
            grid-row: 1;
          }
          & :nth-child(2) {
            grid-column: 2 / 7;
            grid-row: 2;
          }
          & :nth-child(3) {
            grid-column: 7 / 12;
            grid-row: 1 / 4;
          }
          & :nth-child(4) {
            grid-column: 2 / 7;
            grid-row: 3 / 5;
          }
          & :nth-child(5) {
            grid-column: 7 / 11;
            grid-row: 4 / 6;
          }
        }
      }

      &#hotel-bed-and-breakfast {
        & > div:nth-of-type(1) {
          grid-column: 2 / 7;
        }
        & > div:nth-of-type(2) {
          grid-column: 8 / 12;
        }
        & article.slide {
        }
      }
    }

    & section#groepsaccommodatie {
      & > div:nth-of-type(1) {
        grid-column: 2 / 7;
      }
      & > div:nth-of-type(2) {
        grid-column: 8 / 12;
      }
      & article.slide {
      }
    }

    & section#onze-kamers {
      & > div:nth-of-type(1) {
        grid-column: 2 / 9;
      }
      & article.slide {
      }
    }

    & section#de-omgeving {
      & > div:nth-of-type(1) {
        grid-column: 2 / 10;
      }
      & article:nth-of-type(1) {
        grid-column: 2 / 7;
      }
      & article:nth-of-type(2) {
        grid-column: 7 / 12;
      }
      & article:nth-of-type(3) {
        grid-column: 7 / 12;
        grid-row: span 2;
      }
      & article:nth-of-type(4) {
        grid-column: 2 / 7;
        grid-row: 3;
      }
      & article:nth-of-type(5) {
        grid-column: 2 / 7;
      }
    }
  }
  footer div.directions {
    padding-left: 0;
    padding-right: 0;

    & .address {
      grid-column: 2 / 6;
    }
    & .map {
      grid-column: 7 / 12;
      display: block;

      & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        background: var(--dune-100);
        border-radius: var(--gap);
      }
    }
  }
}

/* Desktop */
@media (min-width: 50rem) {
  body {
    font-size: 1.2rem;
  }
}
