/* base */

* {
    box-sizing: border-box;
    cursor:url('../images/akira_kurosawa_mouse.png'), auto;
}

:root {
  --paper: #f4efe2;
  --ink: #111;
  --accent: #000;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background-image: url("../images/bg.png");
  background-size: 65%;
  color: var(--ink);
  line-height: 1.6;
}

/* nav */

nav {
  border-bottom: 3px solid var(--accent);
  padding: 10px 20px;
  background: #fff;
}

nav a {
  text-decoration: none;
  color: var(--ink);
  margin-right: 20px;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* video embeds */

.vidwrapper {
    display: flex;
    justify-content: center;
    grid-column: 1 / -1;
    margin: 20px 0;
}

.vidcontainer {
    position: relative;
    width: 50%;
    padding-bottom: 28.125%; /* 16:9 at 50% width */
}

.trailer .vidcontainer {
    width: 100%;
    padding-bottom: 56.25%;
}

.video-list .vidcontainer {
    width: 100%;
    padding-bottom: 56.25%;
}

.vidcontainer iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* page header */

.page-header {
  border-bottom: 4px solid var(--accent);
  padding: 20px;
  text-align: center;
  background: #fff;
}

.page-header h1 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* movie hub layout */

.movie-layout {
  display: grid;
  grid-template-columns: 1.2fr 2fr 1fr;
  grid-template-areas:
    "poster summary summary"
    "shot trailer essays";
  gap: 20px;
  padding: 20px;
}

.poster { grid-area: poster; }
.summary { grid-area: summary; }
.shot { grid-area: shot; }
.trailer { grid-area: trailer; }
.essays { grid-area: essays; }

.vid { margin: 40px auto; }

/* sections */

.section {
  border: 3px solid var(--accent);
  padding: 15px;
  background: #fff;
}

.section-title {
  background: var(--accent);
  color: #fff;
  padding: 6px 10px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.poster img {
  width: 100%;
  display: block;
  border: 3px solid var(--accent);
}

/* shot list */

.shot-list a {
  display: block;
  padding: 6px 0;
  border-bottom: 1px solid #ccc;
  text-decoration: none;
  color: var(--ink);
  font-family: "Courier New", monospace;
}

.shot-list a:hover {
  background: #eee;
}

/* essay links */

.essay-links a {
  display: block;
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--ink);
}

.essay-links a:hover {
  text-decoration: underline;
}

/* container */

.site-container {
  max-width: 1100px;
  margin: 40px auto;
  background: #fff;
  border: 4px solid #000;
}

/* home page */

.subheading {
  margin-top: 10px;
  font-style: italic;
}

.now-showing-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  align-items: center;
}

.poster-link img {
  width: 100%;
  border: 3px solid #000;
}

.enter-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: bold;
  text-decoration: none;
  border-bottom: 2px solid #000;
}

.enter-link:hover {
  background: #eee;
}

/* scene pages */

.shot-grid {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.shot-block {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  border-bottom: 2px solid #000;
  padding-bottom: 15px;
}

.shot-text h3 {
  margin-top: 0;
  font-family: "Courier New", monospace;
}

.shot-image img {
  width: 100%;
  border: 3px solid #000;
}

/* blog index */

.post-list-item {
  border-bottom: 2px solid #000;
  padding: 15px 0;
}

.post-list-item:last-child {
  border-bottom: none;
}

.post-meta {
  font-family: "Courier New", monospace;
  font-size: 0.8rem;
  color: #555;
  margin-bottom: 4px;
}

.post-title a {
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--ink);
}

.post-title a:hover {
  text-decoration: underline;
}

.post-excerpt {
  margin-top: 6px;
  margin-bottom: 0;
}

/* blog post */

.blog-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0;
  align-items: start;
  border: 3px solid var(--accent);
  background: #fff;
}

.post-body {
  padding: 20px;
}

.post-body p {
  max-width: 65ch;
  line-height: 1.8;
  margin-bottom: 1.2em;
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-body h2 {
  font-family: Georgia, "Times New Roman", serif;
  border-bottom: 2px solid #000;
  padding-bottom: 4px;
  margin-top: 1.6em;
}

.post-body a {
  color: var(--ink);
}

.post-body a:hover {
  text-decoration: none;
}

/* blog sidebar */

.blog-sidebar {
  border-left: 3px solid var(--accent);
  padding: 15px;
  position: sticky;
  top: 20px;
}

.sidebar-post {
  padding: 8px 0;
  border-bottom: 1px solid #ccc;
}

.sidebar-post:last-child {
  border-bottom: none;
}

.sidebar-post a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-weight: bold;
  line-height: 1.4;
}

.sidebar-post a:hover {
  text-decoration: underline;
}

.sidebar-date {
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  color: #555;
  margin-top: 2px;
}

/* responsive */

@media (max-width: 900px) {
  .movie-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "poster"
      "summary"
      "shot"
      "trailer"
      "essays";
  }

  .now-showing-grid {
    grid-template-columns: 1fr;
  }

  .shot-block {
    grid-template-columns: 1fr;
  }

  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    border-left: none;
    border-top: 3px solid var(--accent);
  }
}
