html {
  color: #000;
  font-family: Arial, sans-serif;
  min-width: 360px;
}

html.show-theater {
  background: #1a1a1a;
}

body {
  background: #fff;
  background: linear-gradient(180deg, #ccc 0, #fff 200px) no-repeat;
  font-size: 100%;
  margin: 0;
  max-width: 100vw;
  position: relative;
}

.dwm-logo {
  background-image: url('/dragonwake-media.svg');
  background-size: contain;
  background-repeat: no-repeat;
  color: #343015;
  box-sizing: border-box;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: bold;
  height: 4em;
  padding: 1.5em 0 0 2.5em;
  text-transform: uppercase;
  width: 16em;
}

.dwm-logo::first-line {
  font-size: 1.5em;
}

header,
#content,
footer {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 960px;
  min-width: 360px;
}

header {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

#content {
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

footer {
  margin-top: 100px;
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

header > *,
#content > *,
footer > * {
  padding: 0 16px;
  position: relative;
}

header > * {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 0;
}

header a {
  color: #343015;
  text-decoration: none;
}

header a:not(.home-button):any-link:hover {
  text-decoration: underline;
}

header h1 {
  font-size: 20px;
  margin: 8px 0;
}

header nav {
  align-items: baseline;
  display: inline-flex;
  flex-grow: 1;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-evenly;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 20pt;
}

header nav ul {
  display: contents;
}

header nav li {
  display: block;
  white-space: nowrap;
}

#content h1 {
  font-family: 'Josefin Sans', sans-serif;
  text-align: center;
}

h2 {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: normal;
  margin: 2em 0 16px 0;
}

article {
  -moz-box-shadow: 10px 10px 10px 5px rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 10px 10px 10px 5px rgba(0, 0, 0, 0.1);
  box-shadow: 10px 10px 10px 5px rgba(0, 0, 0, 0.1);
}

a.video-link:any-link,
a.screenplay-link:any-link {
  box-sizing: border-box;
  color: #fff;
  display: block;
  text-decoration: none;
  transition: transform 0.2s ease;
  position: relative;
  width: 100%;
}

a.video-link img {
  display: block;
  max-width: 100vw;
  width: 100%;
}

a.video-link h3 {
  background: #000;
  background: radial-gradient(circle at left, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
  box-sizing: border-box;
  font-weight: normal;
  left: 0;
  margin: 8px 0;
  padding: 0 16px;
  position: absolute;
  top: 0;
  width: 100%
}

a.video-link text {
  fill: #fff;
}

a.video-link::after {
  background-image: url('/icons/play-button.svg');
  background-repeat: no-repeat;
  background-position: center center;
  content: '\a0';
  display: block;
  height: 64px;
  left: 50%;
  opacity: 0.25;
  position: absolute;
  top: 50%;
  -moz-transform: translateX(-50%) translateY(-50%);
  -ms-transform: translateX(-50%) translateY(-50%);
  -webkit-transform: translateX(-50%) translateY(-50%);
  transform: translateX(-50%) translateY(-50%);
  transition: opacity 0.2s;
  width: 64px;
}

a.video-link:hover,
a.video-link:focus,
a.screenplay-link:hover,
a.screenplay-link:focus {
  transform: scale(1.05);
}

a.video-link:hover::after,
a.video-link:focus::after {
  opacity: 1;
}

.flexbox {
  align-items: center;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap-reverse;
  gap: 16px;
  justify-content: space-evenly;
}

.flexbox > * {
  flex: 1;
  min-width: 240px;
  order: calc(0 - var(--index));
}

#theater-dialog {
  background: #000;
  border: none;
  box-sizing: border-box;
  color: #fff;
  max-height: 100vh;
  max-width: 100vw;
  overflow-y: auto;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  width: 960px;
}

#theater-dialog::backdrop {
  background: #1a1a1a;
  background: rgba(0, 0, 0, 0.9);
}

#theater-dialog .close-button {
  border: none;
  background: transparent;
  color: #fff;
  float: right;
  font-size: 24px;
}

#theater-dialog iframe {
  aspect-ratio: 16 / 9;
  border: none;
  visibility: hidden;
  width: 100%;
}

#theater-dialog iframe.loaded {
  visibility: visible;
}

#theater-dialog > img,
#theater-dialog > .img-wrapper > img {
  width: 100%;
}

.img-wrapper {
  clear: both;
  position: relative;
}

.img-wrapper .image-overlay {
  align-content: center;
  align-items: center;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  gap: 5%;
  height: 100%;
  justify-content: center;
  left: 0;
  padding: 5%;
  position: absolute;
  top: 0;
  width: 100%;
}

.img-wrapper .image-overlay > * {
  -webkit-filter: drop-shadow(0 0 2px #000);
  filter: drop-shadow(0 0 2px #000);
  flex: 1;
  max-width: 25%;
}

@media (prefers-color-scheme: dark) {
  .img-wrapper .image-overlay > * {
    -webkit-filter: drop-shadow(0 0 2x #000);
    filter: drop-shadow(0 0 2px #000);
  }
}

#theater-dialog :any-link {
  color: #ff0;
  text-decoration: none;
}

#theater-dialog :any-link:hover {
  text-decoration: underline;
}

#theater-dialog .info dt {
  color: #ccc;
}

.info {
  margin: 0 16px;
}

.info p {
  font-style: italic;
}

.info dt {
  color: #ccc;
  display: inline;
  font-size: 0.9em;
  text-transform: lowercase;
  white-space: nowrap;
}

.info dt::after {
  content: ': ';
  white-space: nowrap;
}

.info dd {
  display: inline;
  margin: 0;
  white-space: nowrap;
}

.info dd::after {
  content: '\A';
  display: block;
  height: 0;
  visibility: hidden;
}

ul.vod-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
}

ul.vod-links li {
  display: block;
}

ul.vod-links img {
  width: 60px;
}

a.screenplay-link {
  background-color: #1a1a1a;
  background-position-x: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #fff;
  display: block;
  font-family: 'Courier New', monospace;
  margin: 16px 0;
  padding: 1em;
  text-align: center;
}

a.screenplay-link > * {
  background: #000;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
}

a.screenplay-link h3 {
  font-size: 2em;
  text-decoration: underline;
  text-transform: uppercase;
}

a.screenplay-link address.author {
  font-style: normal;
}

section::after {
  content: '\a0';
  display: block;
  height: 0;
  visibility: hidden;
  clear: both;
}

.contact-card {
  background: #343015;
  border: 1px solid #343015;
  border-radius: 0.5em;
  color: #fff;
  float: left;
  margin: 0 1em 1em 0;
  overflow: hidden;
  width: 240px;
}

@media screen and (max-width: 480px) {
  .contact-card {
    float: none;
    margin: 0 auto 1em auto;
  }
}

.contact-card :any-link {
  color: inherit;
}

.contact-card img {
  display: block;
  margin: 0 auto;
  width: 100%;
}

footer {
  color: #ccc;
  font-size: 0.667em;
}

footer > * {
  margin: 16px;
}

a > .email-domain::before {
  content: '@';
}

* { --index: 1000; }
:nth-child(1) { --index: 1; }
:nth-child(2) { --index: 2; }
:nth-child(3) { --index: 3; }
:nth-child(4) { --index: 4; }
:nth-child(5) { --index: 5; }
:nth-child(6) { --index: 6; }
:nth-child(7) { --index: 7; }
:nth-child(8) { --index: 8; }
:nth-child(9) { --index: 9; }
:nth-child(10) { --index: 10; }
