:root {
  --type-base: 'Crimson Pro', Georgia, serif;
  --max-width: 768px;
  --color-accent: hsl(333, 80%, 38%);
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: hsl(52, 8%, 98%);
  color: hsl(49, 4%, 22%);
  font-family: var(--type-base);
  font-size: 21px;
  font-weight: 400;
  line-height: 25px;
  min-height: 100vh;
  padding: 0 24px 96px;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
}

h2 {
  font-size: 28px;
  line-height: 32px;
}

p {
  margin: 25px 0;
  padding: 0;
}

a,
a:link,
a:visited {
  color: var(--color-accent);
}

.success-message {
  color: var(--color-accent);
}

.site__banner {
  box-sizing: border-box;
  height: 100%;
  margin: 0 auto;
  max-width: 768px;
  padding: 48px 0 0;
  width: 100%;
}

@media (min-width: 580px) {
  .site__banner {
    display: grid;
    grid-template-columns: 48% 52%;
    grid-template-rows: 1fr auto auto;
  }
}

@media (min-width: 580px) {
  .site__banner-image {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
  }
}

.site__banner-image img {
  display: block;
  height: 45vh; 
  max-height: 450px;
  min-height: 300px;
  object-fit: cover;
  object-position: top center;
  width: 100%;
}

@media (min-width: 580px) {
  .site__banner-image img {
    height: auto;
  }
}

.site-title {
  box-sizing: border-box;
  color: hsl(105, 0%, 13%);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 28px;
  margin: 0;
  padding: 12px 16px;
  text-align: center;
  transform: rotate(0deg);
}

@media (min-width: 375px) {
  .site-title {
    font-size: 32px;
    line-height: 32px;
  }
}

@media (min-width: 580px) {
  .site-title {
    align-self: end;
    font-size: 5.1vw;
    letter-spacing: 0;
    line-height: 4.5vw;
    text-align: left;
  }
}

@media (min-width: 768px) {
  .site-title {
    font-size: 40px;
    line-height: 38px;
  }
}

.site-title span {
  color: hsla(105, 0%, 13%, 0.7);
  display: block;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 16px;
  text-shadow: none;
  text-transform: uppercase;
}

.nav {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  max-width: var(--max-width);
  width: 100%;
}

@media (min-width: 580px) {
  .nav {
    margin-top: 0;
  }
}

.nav-list {
  border-bottom: 1px dotted hsla(49, 4%, 28%, 0.35);
  border-top: 1px dotted hsla(49, 4%, 28%, 0.35);
  font-size: 16px;
  line-height: 16px;
  list-style: none;
  margin: 0;
  padding: 7px 0 8px;
  text-align: center;
}

@media (min-width: 580px) {
  .nav-list {
    border: none;
    padding: 0 0 8px 16px;
    text-align: left;
  }
}

.nav-list__item {
  display: inline-block;
  padding: 0 12px;
  text-transform: uppercase;
}

@media (min-width: 580px) {
  .nav-list__item {
    padding: 0 12px 0 0;
  }
}

.nav-list__link {
  color: hsl(333, 80%, 38%);
}

.page-content {
  padding: 24px 0;
  margin: 0 auto;
  max-width: 640px;
}

@media (min-width: 580px) {
  .page-content {
    padding: 24px;
  }
}

.intro-copy {
  font-size: 25px;
  font-weight: 300;
  line-height: 32px;
  margin: 48px 0 0;
}

.intro-copy::after {
  color: hsl(333, 80%, 38%);
  content: "❉❉❉❉❉";
  display: block;
  font-size: 13px;
  font-weight: 200;
  letter-spacing: 6px;
  line-height: 16px;
  margin: 24px 0;
  opacity: 0.7;
  text-align: center;
}

.notify-form {
  display: grid;
  grid-template-columns: 1fr auto;
  margin: 50px 0;
  max-width: 450px;
}

.notify-form__label {
  color: hsl(49, 4%, 28%);
  font-size: 18px;
  grid-column: 1 / 3;
}

.notify-form__input {
  border: 1px solid hsla(0, 0%, 0%, 0.5);
  border-radius: 4px 0 0 4px;
  box-shadow: inset 0 0 4px hsla(0, 0%, 0%, 0.4);
  box-sizing: border-box;
  color: hsl(49, 4%, 22%);
  font-size: 18px;
  line-height: 22px;
  margin: 0;
  outline: 0;
  padding: 8px;
  transition: all 300ms ease-out;
}

.notify-form__input:focus {
  border-color: hsl(333, 80%, 38%);
  box-shadow: inset 0 0 1px hsla(0, 0%, 0%, 0.2);
}

.notify-form__input:valid {
  border-color: hsl(333, 80%, 38%);
  box-shadow: inset 0 0 1px hsla(0, 0%, 0%, 0.2);
}

.notify-form__input::placeholder {
  color: hsl(49, 4%, 62%);
  font-size: 18px;
  line-height: 22px;
}

.notify-form__submit {
  background: hsl(63, 10%, 94%); 
  border: 1px solid hsla(0, 0%, 0%, 0.5);
  border-left: none;
  border-radius: 0 4px 4px 0;
  color: hsl(49, 4%, 62%);
  cursor: pointer;
  font-size: 16px;
  line-height: 22px;
  margin: 0;
  padding: 8px 16px;
  transition: all 300ms ease-out;
}

.notify-form__input:valid ~ .notify-form__submit {
  background: hsl(333, 80%, 38%);
  border-color: hsl(333, 80%, 38%);
  color: hsla(0, 0%, 100%, 0.95);
}

.story-form label {
  color: hsl(49, 4%, 28%);
  display: block;
  font-size: 18px;
}

.story-form label[required]:after {
  color: hsl(333, 80%, 38%);
  content: "*";
}

.story-form input[type="text"],
.story-form input[type="email"],
.story-form textarea {
  border: 1px solid hsla(0, 0%, 0%, 0.5);
  border-radius: 4px;
  box-shadow: inset 0 0 4px hsla(0, 0%, 0%, 0.4);
  box-sizing: border-box;
  color: hsl(49, 4%, 22%);
  font-size: 18px;
  line-height: 22px;
  margin: 0 0 16px;
  outline: 0;
  padding: 8px;
  transition: all 300ms ease-out;
  width: 100%;
}

.story-form input[type="text"]:focus,
.story-form input[type="email"]:focus,
.story-form textarea:focus {
  border-color: hsl(333, 80%, 58%);
}

.story-form textarea[name="story"] {
  height: calc(10.25 * 28px);
}

.story-form textarea[name="how_did_you_know_them"] {
  height: calc(3.25 * 28px);
}

.story-form input[type="radio"] {
  margin: 6px 0 0 4px;
}

.visibility-options {
  display: grid;
  grid-gap: 16px 8px;
  grid-template-columns: auto 1fr;
  margin: 0 0 16px;
}

.story-form button[type="submit"] {
  background: hsl(333, 80%, 38%);
  border: 1px solid hsl(333, 80%, 38%);
  border-left: none;
  border-radius: 4px;
  color: hsla(0, 0%, 100%, 0.95);
  cursor: pointer;
  font-size: 16px;
  line-height: 22px;
  margin: 22px 0 0;
  padding: 8px 16px;
  text-align: center;
  transition: all 300ms ease-out;
  width: 100%;
}

.story-form button[type="submit"]:hover {
  background: hsl(333, 80%, 43%);
}

.story::after {
  color: hsl(333, 80%, 38%);
  content: "❉❉❉❉❉";
  display: block;
  font-size: 13px;
  font-weight: 200;
  letter-spacing: 6px;
  line-height: 16px;
  margin: 24px 0;
  opacity: 0.7;
  text-align: center;
}

.story:first-child::before {
  color: hsl(333, 80%, 38%);
  content: "❉❉❉❉❉";
  display: block;
  font-size: 13px;
  font-weight: 200;
  letter-spacing: 6px;
  line-height: 16px;
  margin: 24px 0;
  opacity: 0.7;
  text-align: center;
}

.story__author {
  font-size: 18px;
}

.story__date {
  color: hsl(49, 4%, 42%);
  font-style: italic;
}

.story__permalink {
  font-size: 14px;
  text-transform: uppercase;
}

.pagination {
  align-items: center;
  color: hsl(0, 0%, 50%);
  display: flex;
  font-size: 18px;
  justify-content: space-between;
}

.pagination a {
  font-weight: 500;
  text-decoration: none;
}
