/* Boilerplate */

/* Fonts */
@font-face {
  font-family: Executive;
  src: url(/fonts/F25_Executive.otf);
}

@font-face {
  font-family: Alagard;
  src: url(/fonts/alagard.ttf);
}

@font-face {
  font-family: The Wall;
  src: url(/fonts/TheWall.ttf);
}

:root {
  /* Colours*/
  --jet: #2d2a28;
  --linen: #f5ebe0;
  --cerise: #e63e62;
  --mountbatton-pink: #9b6f7f;
  --blush: #c76f82;

  /* Text: */
  --normal-font: Executive;
  --pixel-gothic-font: Alagard, serif;
  --pixel-cursive-font: The Wall, serif;
  --font-size: 12px;
}

/* Main Elements */

* {
  cursor: url(/images/ghost.gif), auto;
  box-sizing: border-box;
}

:root {
  overscroll-behavior: none;
}

span.blockspam {
  display: none;
}

/* Elements that should only appear on mobile */
.desktop-br {
  display: inline;
}
.mobile-br {
  display: none;
}
.mobile-decor {
  display: none;
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 80%;
  min-width: 750px;
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 10px;
  position: relative;
  flex: 1;
}

body {
  background-image: url("/images/backgrounds/general-background.jpg");
  @supports (background-image: url("/images/backgrounds/general-background.webp")) 
  {
    background-image: url("/images/backgrounds/general-background.webp");
  }
  background-repeat: repeat;
  background-attachment: fixed;
  background-position: center;
  height: 100%;
  margin: 0;
  overscroll-behavior: none;
}

h1 {
  font-family: var(--pixel-gothic-font);
  color: var(--blush);
  font-size: 2.25em;
  line-height: calc(1ex / 0.45);
  margin: calc(1ex / 0.45) 0 calc(1ex / 0.8);
}

h2 {
  font-family: var(--pixel-gothic-font);
  color: var(--blush);
  font-size: 2em;
  line-height: calc(1ex / 0.45);
  margin: calc(1ex / 0.45) 0 calc(1ex / 0.8);
}

h3 {
  font-family: var(--pixel-gothic-font);
  color: var(--blush);
  font-size: 1.75em;
  line-height: calc(1ex / 0.38);
  margin: calc(1ex / 0.38) 0 calc(1ex / 0.45);
}

p {
  font-family: var(--normal-font);
  color: var(--jet);
  font-size: 1em;
  font-size-adjust: 0.5;
  line-height: calc(1ex / 0.32);
  margin: calc(1ex / 0.32) 0;
}

article p {
  width: 80ch;
  max-width: 100%;
}

p::selection {
  color: var(--linen);
  background: var(--cerise);
}

b {
  font-family: var(--normal-font);
  font-size: 1.1em;
  color: var(--cerise);
}

b::selection {
  color: var(--linen);
  background: var(--cerise);
}

a {
  font-family: var(--normal-font);
  color: var(--blush);
  text-decoration: underline dashed;
  font-size: 1em;
  font-weight: 600;
  font-size-adjust: 0.5;
  line-height: calc(1ex / 0.32);
  margin: calc(1ex / 0.32) 0;
}

a:hover {
  color: var(--cerise);
  text-decoration: none;
}

a::selection {
  color: var(--linen);
  background: var(--cerise);
}

.alternative-link-style a {
  font-family: var(--pixel-cursive-font);
  color: var(--cerise);
  text-decoration: underline var(--mountbatton-pink) wavy 1.5px;
  font-size: 2em;
}

.alternative-link-style a:hover {
  color: var(--mountbatton-pink);
  text-decoration: underline var(--cerise) wavy 1.5px;
}

.alternative-link-style a::selection {
  color: var(--linen);
  background: var(--cerise);
}

.citation {
  padding-left: 22px;
  text-indent: -22px;
}

.center-align {
  display: block;
  text-align: center;
}

.callout {
  border: 5px double var(--mountbatton-pink);
  border-radius: 5px;
  display: inline-block;
  padding-left: 20px;
  padding-right: 20px;
}

/* Decor Styling*/

.decor {
  position: absolute;
  max-width: 20%;
  height: 95%;
  max-height: 95%;
  text-align: center;
}

.decor.left {
  left: -15%;
  top: 140px;
}

.decor.right {
  right: -15%;
  top: 140px;
}

.decor img {
  object-fit: contain;
  position: relative;
  filter: drop-shadow(2px 2px 5px var(--jet));
  z-index: 1;
}

.mobile-decor img {
  filter: drop-shadow(2px 2px 5px var(--jet));
  z-index: 1;
}

.link-decor:hover {
  rotate: 3deg;
  transition: 0.2s ease;
}

#moon-widget {
  position: relative;
  top: 25%;
}

#moon-widget a {
  color: #7f7f7f;
}

/* Header Content */

.header_image {
  margin-top: 20px;
  width: 100%;
}

.header_image img {
  width: 50%;
  height: 50%;
}

.header-content {
  background-image: url("/images/backgrounds/ghosts-background.jpg");
  @supports (background-image: url("/images/backgrounds/ghosts-background.webp")) 
  {
    background-image: url("/images/backgrounds/ghosts-background.webp");
  }
  background-color: var(--jet);
  margin: 10px;
  border: 5px double var(--linen);
  border-radius: 3px;
}

#mobile_nav {
  display: none;
}

.header-content ul {
  list-style-type: none;
  display: flex;
  justify-content: space-evenly;
}

.header-content ul a {
  color: var(--linen);
  text-decoration: none;
  font-family: Alagard, serif;
  font-size: 1.5em;
}

.header-content ul a:hover {
  color: var(--cerise);
  text-decoration: none;
  transform: rotate(5deg);
  transition: 0.2s ease;
}

.header-content li img {
  margin-right: 5px;
}

/* Main Content */

main {
  max-width: 100%;
  margin: 0 auto;
  position: relative;
}

iframe {
  margin: auto;
  display: block;
}

.generic-backing {
  background-image: url("/images/backgrounds/paper_background.jpg");
  @supports (background-image: url("/images/backgrounds/paper_background.webp")) 
  {
    background-image: url("/images/backgrounds/paper_background.webp");
  }
  background-color: var(--linen);
  padding: 1vh 5vw 4vh 5vw;
  border: 5px double var(--cerise);
  border-radius: 5px;
}

.grid-display {
  padding: 5% 0% 5% 0%;
  display: grid;
  gap: 30px;
  grid-template:
    "grid-image-1 grid-text-1"
    "grid-text-2 grid-image-2"
    "grid-image-3 grid-text-3";
}

grid-image-1 {
  text-align: center;
}

.about-picture {
  align-self: center;
  filter: drop-shadow(2px 2px 5px var(--jet));
}

.about-picture img {
  border-radius: 2px;
}

.about-picture-tall {
  align-self: center;
  filter: drop-shadow(2px 2px 5px var(--jet));
  width: 375px;
  height: 500px;
}

#boots-card {
  position: relative;
  z-index: 15;
  transform: rotate(2deg);
}

#whaling-card {
  position: absolute;
  z-index: 5;
  left: 1.5vw;
  bottom: 5vh;
  transform: rotate(-1deg);
}

.card-animation {
  animation: shuffle 0.8s ease-in-out;
}

@keyframes shuffle {
  50% {
    transform: translateY(-260px) rotate(-4deg);
    transition: ease-in-out;
  }

  80% {
    transform: translateY(0) rotate(-1deg);
    transition: ease-in-out;
    z-index: 15;
  }
}

.about-picture-tall:hover .card-flip,
.about-picture-tall.hover .card-flip {
  transform: rotateY(180deg);
}

.card-flip {
  transition: 0.5s;
  transform-style: preserve-3d;
  position: relative;
}

#front,
#back {
  position: absolute;
  backface-visibility: hidden;
  width: 375px;
  height: 500px;
}

#front {
  z-index: 2;
}

#back {
  transform: rotateY(180deg);
}

.youtube-video {
  width: 100%;
  aspect-ratio: 16 / 9;
}

#video-list ul {
  list-style-type: none;
  padding-left: 0;
}

#video-list li {
  font-size: 1.1em;
  margin-bottom: 1vh;
}

#sources {
  padding-right: 2vw;
}

#buttons {
  margin-top: 30px;
}

/* Footer */

footer {
  text-align: center;
  background: var(--jet);
  font-family: var(--normal-font);
  padding: 20px;
  border-top: 5px double var(--linen);
  z-index: 50;
  margin-top: 30px;
}

footer p,
footer a {
  /* Special version of blush colour to meet accessibility requirements */
  color: #cc7b8c;
}

@media all and (max-width: 749px) /* Breakpoint for phone screens*/ {
  .desktop-br {
    display: none;
  }
  .mobile-br {
    display: inline;
  }

  .container {
    width: calc(100% - 20px);
    max-width: inherit;
    min-width: inherit;
  }

  .header_image img {
    width: 90%;
    height: 90%;
  }

  nav {
    display: none;
  }

  #mobile_nav {
    display: block;
  }

  details > summary {
    text-align: left;
    font-family: var(--pixel-gothic-font);
    color: var(--blush);
    font-size: 1.6em;
    margin-left: 5%;
    margin-top: 2%;
    margin-bottom: 2%;
  }

  summary::marker {
    color: var(--linen);
    font-size: 0.9em;
  }

  .header-content ul {
    display: block;
    text-align: left;
  }

  .header-content li {
    margin-top: 1vh;
  }

  .decor {
    display: none;
  }

  .mobile-decor {
    display: block;
  }

  .about-picture-tall,
  #front,
  #back img {
    width: 300px;
    height: 400px;
  }
}

@media all and (max-width: 1150px) /* Breakpoint for About page grid*/ {
  .grid-display {
    grid-template:
      "grid-image-1"
      "grid-text-1"
      "grid-image-2"
      "grid-text-2"
      "grid-image-3"
      "grid-text-3";
  }

  #decor-mug {
    display: none;
  }

  .about-picture-tall:hover .card-flip,
  .about-picture-tall.hover .card-flip {
    transform: rotateY(0deg);
  }

  #boots-card,
  #whaling-card {
    width: 95%;
    height: auto;
  }
}

@media all and (min-width: 750px) and (max-width: 899px) /* Breakpoint for tablets to hide desktop decor*/ {
  .decor {
    display: none;
  }

  .mobile-decor {
    display: block;
  }

  #mobile-decor-moon-dress {
    display: none;
  }
}
