:root {
  --cream: #EBE7DC;
  --brown: #9f3c19;
  --blue: #517FB3;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@view-transition {
  navigation: auto;
}

[id] {
  scroll-margin-top: 2rem;
}

html {
  scroll-behavior: smooth;
  font-family: Rockwell, 'Rockwell Nova', 'Roboto Slab', 'DejaVu Serif', 'Sitka Small', serif;
  font-weight: normal;
  font-size: 1rem;
  line-height: 2rem;
}

body {
  text-rendering: optimizeLegibility;
  display: flex;
  background-color: var(--cream);
  color: #454749;
}

.sidebar {
  width: 20%;
  text-align: center;
  background-color: var(--blue);
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logobox {
  cursor: pointer;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  row-gap: .5lh;
  max-width: 5lh;
  text-wrap: balance;
  text-wrap: pretty;
  color: var(--cream);
  text-decoration: none;

  img {
    margin: auto;
    width: 100%;
  }

}

input#toggleMenu,label#toggleMenulabel {
  display: none;
}

main {
  width: 80%
}

.splash img {
  width: 100%;
  height: 50vh;
  object-fit: cover;
  object-position: center;
}

.photo-credit {
  font-size: .7rem;
  text-align: right;
  padding-right: 2ch;
}

nav {
  display: flex;
  flex-direction: column;
  row-gap: 1lh;
  margin: 2lh 0;
}

.sticky {
  position: sticky;
  top: 1lh;

}

nav a {
  color: var(--cream);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.1s ease-in;
  width: fit-content;
  margin: auto;
}

nav a:hover {
  color: #3F4666;
  transition: color 0.1s ease-in;
}

video {
  max-width: 100%;
}

.bagpipe {
  transition: transform 0.3s ease-in-out;
}

#listen:hover .bagpipe {
  transform: scale(1.1) rotate(10deg);
}

#listen {
  background-color: var(--brown);
  border-radius: 1em;
  padding: .5lh;
  display: flex;
  flex-direction: row;
  gap: 1lh;
  align-items: center;
  color: var(--cream);
  cursor: pointer;
}

@keyframes vibrate {0% { transform: translate(0); } 20% { transform: translate(-2px, 2px); } 40% { transform: translate(-2px, -2px); } 60% { transform: translate(2px, 2px); } 80% { transform: translate(2px, -2px); } 100% { transform: translate(0);} }

.vibrate { 
    animation: vibrate 1s ease 0s infinite normal none; 
}

article {
  max-width: 75ch;
  padding: 2lh;
}

article p {
  margin-block: 1lh;
}

article a,
footer a {
  color: var(--brown);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.1s ease-in;
}

article a:hover,
footer a:hover {
  color: #5d3a40;
  transition: color 0.1s ease-in;
}


article.columns {
  display: flex;
  flex-direction: row;
  gap: 3lh;
  max-width: 100%;
  justify-content: space-between;

  .column1 {
    max-width: 75ch;
  }

  .column2 {
    max-width: 50%;

    a {
      height: fit-content;
    }

    .card {
      width: 100%;
      background-color: #ffffff;
      border-radius: 12px;
      background-color: #ffffff;
      border-radius: 12px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      position: relative;
      padding: 80px 20px 20px;
      text-align: center;
      height: max-content;
      margin: auto;
    }

    .card-image {
      position: absolute;
      top: -50px;
      left: 50%;
      transform: translateX(-50%);
      width: 120px;
      height: 120px;
      border-radius: 50%;
      overflow: hidden;
      border: 4px solid white;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .card-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .card-content {
      color: #333;
    }

    .card-content h3 {
      margin-bottom: 10px;
      font-size: 1.2rem;
    }

    .card-content p {
      font-size: 0.9rem;
      color: #666;
      text-wrap: pretty;
    }
  }
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
  margin: 0 0 1em 0;
}

h2,
ul,
hr {
  margin: 1lh 0;
  border: none;
}

li {
  margin-block: 1lh;
  margin-left: 1lh;
}

#event-list {
text-transform: capitalize;
}

#event-list time {
width: 100%;
display: block;
}

.map {
  border: none;
  width: 100%;
  height: 50vh;
}

form {
  margin-block: 2lh;

  label {
    font-weight: 600;
  }

  label[for=size] {
    display: none;
  }

  input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    margin: 8px 0;
    box-sizing: border-box;
    border: none;
    border-radius: .5em;
  }

  textarea {
    width: 100%;
    height: 150px;
    padding: 1rem;
    box-sizing: border-box;
    border: none;
    border-radius: .5em;
    font-size: 1rem
  }

  button[type=submit] {
    font-size: 1rem;
    background-color: var(--brown);
    border: none;
    border-radius: .5em;
    color: var(--cream);
    padding: .8em 2em;
    cursor: pointer;
    font-weight: 600;
  }

  button[type=submit]:hover {
    background-color: #5d3a40;
  }

}

footer {
  display: flex;
  flex-direction: row;
  width: 100%;
  padding: 1lh;
  font-size: .7rem;
  margin-top: 3lh;
  justify-content: space-around;
  background-color: rgba(0, 0, 0, 0.1);
}

@media (max-width: 1000px),
(max-height: 500px) {
  body {
    flex-direction: column;
    background-color: var(--blue);
  }

  nav {
    display: none;
  }

  main {
    width: unset;
    background-color: var(--cream);
  }

  .splash img {
    height: 35vh;
  }

  article {
    padding: 1lh;
  }

  article.columns {
    display: flex;
    flex-direction: column-reverse;

    .column2 {
      max-width: unset;
    }

  }

  .sticky {
    position: unset;
    top: unset;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1lh;
    width: 100%;
  }

  label#toggleMenulabel {
    display: block;
    cursor: pointer;
    font-size: 1.5lh;
    width: fit-content;
    align-self: center;
    justify-self: end;
    color: var(--cream);
    -webkit-user-select: none; /* Safari */
    user-select: none; /* Standard syntax */
  }

  #toggleMenu:checked~nav.menu {
    width: 100%;
    display: flex;
    visibility: visible;
    opacity: 1;
    transition: all .2s ease-in-out;
    padding: 1lh 0;
    margin: 0;
    grid-column: 1 / -1;
  }

  .sidebar {
    width: 100%;
    padding: .5lh;

  }

  .logobox {
    grid-template-columns: repeat(2, 1fr);
    column-gap: .5lh;

    img {
      width: 2lh;
    }

    span {
    line-height: min(5vw, 24px);
    width: 10lh;
    align-self: center;
    font-size: min(5vw, 24px);
    }

  }

  #event-list li {
    margin: 1em 0;
  }

  footer {
    margin-top: 2lh;
    flex-direction: column;
    row-gap: 1lh;
  }

}