html {
  height: 100vh;
  overflow: hidden;
}

body {
  margin: 0;
  background-color: var(--c-moon);
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y proximity;
}

body>* {
  font-family: var(--f-body);
  z-index: 1;
  contain: layout;
  position: relative;
}

a {
  color: var(--c-autumn);

  &.home-link {
    color: white;
    &:hover {
      color: #c77986;
    }
  }

  &:hover {
    color: revert;
  }

  &.btn {
    text-decoration: none;
    color: inherit;
    font-size: 1.2em;
    padding: 12px 22px;
    border: 1px solid white;
    border-radius: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);

    &.inverted {
      border-color: black;
    }

    &.primary {
      font-weight: bold;
      box-shadow: 0 0 8px 2px rgba(255, 255, 255);

      &.inverted {
        box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.6);
      }
    }
  }
}

h2,
h3,
h4 {
  font-family: var(--f-fancy);
  text-align: center;
}

h2 {
  font-size: 2.3rem;
}

h3 {
  font-size: 1.8rem;
}

img {
  border-radius: 1.5em;
  border: 1px solid #000000aa;
  box-sizing: border-box;
}

section {
  display: flex;
  flex-flow: column wrap;
  align-content: center;
  justify-content: center;
  scroll-snap-align: start;

  &:not(:where(#header)) {
    min-height: 100vh;
    height: auto;
  }
}

.glass {
  backdrop-filter: blur(10px);
  padding: 8px 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  display: inline-flex;
  max-width: fit-content;
}

.timer {
  margin-top: 16px;
  display: inline-flex;
  gap: 12px;

  div.digit {
    font-family: "Orbitron";
    padding: 0.4em;
    border-radius: 0.4em;
    background-color: var(--c-gold-light);
    color: var(--c-ink);
    width: 3ex;
    text-align: center;
  }

  div.str {
    font-size: 0.6em;
    text-align: center;
  }
}

#hero {
  position: relative;
  top: -4em;
  background-image: url(img/pexels-francesco-ungaro-29512273.jpg);
  background-size: cover;
  background-position: center;
  min-height: calc(100vh + 4em);
  display: flex;
  flex-flow: column wrap;
  align-content: center;
  justify-content: center;
  color: var(--c-moon);

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(10, 8, 4, 0.75) 0%,
        rgba(10, 8, 4, 0.6) 50%,
        rgba(10, 8, 4, 0.8) 100%);
    z-index: 0;
  }

  >article {
    z-index: 1;
    display: flex;
    flex-flow: column wrap;
    gap: 2.5em;

    h1 {
      font-family: var(--f-fancy);
      font-size: 5em;
      margin: 0;
    }

    div#when-where {
      border-radius: 20px;
      border: 1px solid var(--c-muted);
    }

    div#short-desc {
      font-size: 1.5em;
      white-space: pre-line;
    }

    .logo-image {
      text-align: center;

      img {
        border-radius: 50%;
        border: 3px solid rgba(255, 255, 255, 0.4);
        width: 100px;
        max-width: 100%;
      }
    }

    .countdown {
      align-self: center;
      font-size: 1.3em;
    }

    div.buttons {
      margin-top: 0;
    }
  }
}

div.buttons {
  display: flex;
  gap: 12px;
  align-self: center;
  justify-content: center;
  margin-top: 3em;

  button {
    padding: 12px;
    background-color: transparent;
    color: inherit;
    border: 1px solid var(--c-parchment);
    border-radius: 1.6em;
    font-size: 1.2em;
  }
}

/* overriding Firefox's lack of scroll-state support */
body.scrolled {
  header {
    background-color: var(--c-menu-bg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
    padding: 8px 0;
    color: var(--c-ink);

    svg {
      filter: brightness(0.2);

      &:hover {
        filter: brightness(0.8);
      }
    }
  }
}

#header {
  container-type: scroll-state;
  position: sticky;
  padding: 0;
  top: 0;
  z-index: 2;

  header {
    font-family: var(--f-display);
    display: flex;
    flex-flow: row wrap;
    width: 100vw;
    color: var(--c-moon);
    transition:
      background-color 0.3s var(--ease-3),
      padding 0.3s var(--ease-3),
      box-shadow 0.3s var(--ease-3);

    @container scroll-state(stuck: top) {
      background-color: var(--c-menu-bg);
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
      padding: 8px 0;
      color: var(--c-ink);
    }

    &>* {
      padding: 12px;
    }

    >.socials {
      margin-left: 1em;
      margin-right: auto;
      font-size: 1em;
      display: flex;
      flex-flow: row nowrap;
      gap: 0.8em;

      a {
        svg {
          vertical-align: middle;
          transition: opacity 0.2s ease;
          color: #fff;

          &:hover {
            opacity: 1;
            filter: brightness(0) saturate(100%) invert(55%) sepia(40%) saturate(600%) hue-rotate(320deg) brightness(95%);
          }

          @container scroll-state(stuck: top) {
            filter: brightness(0.2);

            &:hover {
              filter: brightness(0.8);
            }
          }
        }
      }
    }
  }
}

nav {
  flex: 0 1 auto;
  display: flex;
  flex-direction: row;
  align-items: center;

  >ul {
    display: flex;
    flex-flow: row nowrap;
    list-style-type: none;
    margin: 0;
    padding: 0;

    >li {
      text-transform: uppercase;
      flex: 1 1 max-content;
      white-space: nowrap;

      &.menu-toggle-item {
        display: none;
      }

      &:not(:last-child) {
        border-right: 1px solid #65c888;
      }

      >a {
        display: inline-block;
        padding: 2px 12px;
        font-weight: bold;
        text-decoration: none;
        color: inherit;

        &:hover {
          filter: brightness(0) saturate(100%) invert(55%) sepia(40%) saturate(600%) hue-rotate(320deg) brightness(95%);

          @container scroll-state(stuck: top) {
            filter: invert(1);
          }
        }
      }
    }
  }
}

.fancy {
  text-align: center;
  font-size: 2.5em;
  font-family: var(--f-fancy);
}

#workshops,
#pricing,
#about-me {
  background-color: var(--c-parchment);
}

#workshops {
  font-size: 1.5em;

  >div {
    max-width: 75vw;
    container: workshops / inline-size;
    width: 100%;

    .parallel-boxes {
      margin-top: 3em;
      gap: 4em;

      @container workshops (width < 850px) {
        flex-flow: row wrap;
        gap: 5vw;
      }

      >div {
        border-radius: 1em;
        border: none;
        padding: 0 2em;
        background-color: var(--c-moon);
        box-shadow: 0 0 10px rgb(184 154 137 / 65%);

        p {
          margin: revert;
        }
      }
    }
  }
}

#venue {
  height: auto;
  min-height: 100vh;
  padding-top: 3em;
  padding-bottom: 3em;

  >div {
    max-width: 75vw;

    p {
      text-align: justify;
    }

    .gallery {
      display: flex;
      flex-flow: row wrap;
      align-items: center;
      justify-content: center;
      gap: 0.5em;
      max-width: 1600px;
      margin: 2em 0;

      .image {
        display: inline-block;
        width: 21vw;
        height: 14vw;
        max-width: 510px;
        max-height: 340px;
        clip-path: inset(0);

        img {
          width: 21vw;
          height: 14vw;
          max-width: 510px;
          max-height: 340px;
        }
      }
    }
  }
}

#pricing {
  height: auto;
  min-height: 100vh;
  padding-top: 3em;
  padding-bottom: 3em;

  p {
    max-width: 60vw;
  }

  h2,
  h3 {
    font-size: 2.4em;
  }

  .parallel-boxes>div {
    display: flex;
    flex-flow: column wrap;
    align-content: center;
  }
}

#about-me {
  height: auto;
  min-height: 100vh;

  >div {
    padding: 0 3em;
    text-align: justify;

    .parallel-boxes {
      gap: 2em;
      margin-top: 1em;
      margin-bottom: 0;

      >div {
        flex: 0 1 auto;
        border: none;
        box-shadow: none;
        padding: 0;

        h3:first-child {
          margin-top: 0;
        }

        &:first-child {
          flex-basis: 30vw;
          align-self: center;
        }

        p {
          text-align: justify;
        }
      }

      img {
        max-width: 30vw;
      }
    }
  }
}

#contact>div {
  font-size: 1.2em;
  text-align: center;
  max-width: 75vw;

  p:not(.fancy) {
    margin: 0.6em 0;
  }
}

.countdown {
  text-align: center;
}
  .small {
    font-size: 0.8em;
  }

.parallel-boxes {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-around;
  gap: 0.8em;
  margin-bottom: 2em;

  >div {
    border-radius: 1.5em;
    border: 1px solid #000a;
    text-align: center;
    padding: 1.4em;
    flex: 1 1 0px;
    background-color: var(--c-moon);
    box-shadow: 0 0 10px rgb(184 154 137 / 65%);

    &.no-bg {
      background-color: transparent;
    }

    p,
    h4 {
      margin: 0.1em;
    }

    dl {
      padding: 0;
      max-width: 20vw;
      text-align: left;
      padding: 2em;
    }

    h4 {
      font-size: 3em;

      .currency {
        font-size: 0.4em;
      }
    }
  }
}

.timetable {
  text-align: left;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-auto-rows: auto;
  column-gap: 0.5em;
  max-width: 20vw;

  .time {
    text-align: right;
  }
}

footer {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 30vh;
  text-align: center;
  background-image: url(img/morven-pasek.jpg);
  background-size: cover;
  background-position: top center;
  z-index: 0;

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(128, 128, 128, 0.25) 45%,
        rgba(0, 0, 0, 0.95) 95%);
    z-index: 0;
  }

  div {
    color: var(--c-moon);
  }
}