@font-face {
  font-family: 'Cinzel';
  src: url('../fonts/cinzel-latin-400.woff2') format('woff2');
  font-display: swap;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #1B1220;
  color: #E8DCC4;
  font-family: Georgia, 'Times New Roman', serif;
}

.container {
  display: flex;
  box-sizing: border-box;
  min-height: inherit;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.card {
  box-sizing: border-box;
  width: 100%;
  max-width: 44rem;
  padding: clamp(1rem, 5vw, 2.5rem) clamp(1rem, 5vw, 2rem);
  background-color: #22182A;
  border: 20px solid transparent;
  border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60' fill='none' stroke='%23B8954A'%3E%3Crect x='0.5' y='0.5' width='59' height='59'/%3E%3Cpath d='M13 7H47A6 6 0 0 0 53 13V47A6 6 0 0 0 47 53H13A6 6 0 0 0 7 47V13A6 6 0 0 0 13 7Z'/%3E%3Cpath fill='%23B8954A' stroke='none' d='M7 4.5L9.5 7L7 9.5L4.5 7ZM53 4.5L55.5 7L53 9.5L50.5 7ZM53 50.5L55.5 53L53 55.5L50.5 53ZM7 50.5L9.5 53L7 55.5L4.5 53Z'/%3E%3C/svg%3E") 20 stretch;
  text-align: center;
  animation: fade-in 900ms ease;
}

.date,
.title-prefix,
.sides {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.date {
  margin: 0;
  padding-left: 0.2em;
  color: #B8954A;
  font-size: clamp(0.85rem, 3.5vw, 1.15rem);
}

.title {
  margin: 0.4em 0 0.3em;
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 11vw, 6rem);
  font-weight: normal;
  letter-spacing: 0.04em;
  line-height: 1;
}

.title-prefix {
  display: block;
  margin-bottom: 0.3em;
  color: #CFC2A8;
  padding-left: 0.3em;
  font-size: max(0.75rem, 0.2em);
  letter-spacing: 0.3em;
}

.sides {
  display: inline-grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 0.9em;
  margin: 0;
  font-size: clamp(0.7rem, 2.8vw, 0.95rem);
}

.side {
  padding: 0.35em 0.7em 0.35em 0.9em;
  border: 10px solid transparent;
  border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30' fill='none' stroke='%23B8954A'%3E%3Crect x='0.5' y='0.5' width='29' height='29'/%3E%3Cpath d='M6.5 3.5H23.5A3 3 0 0 0 26.5 6.5V23.5A3 3 0 0 0 23.5 26.5H6.5A3 3 0 0 0 3.5 23.5V6.5A3 3 0 0 0 6.5 3.5Z'/%3E%3Cpath fill='%23B8954A' stroke='none' d='M3.5 1.75L5.25 3.5L3.5 5.25L1.75 3.5ZM26.5 1.75L28.25 3.5L26.5 5.25L24.75 3.5ZM26.5 24.75L28.25 26.5L26.5 28.25L24.75 26.5ZM3.5 24.75L5.25 26.5L3.5 28.25L1.75 26.5Z'/%3E%3C/svg%3E") 10 stretch;
  color: inherit;
  line-height: 1.6;
  text-decoration: none;
  transition: background-color 200ms ease, color 200ms ease;
}

.side-byzantine {
  background-color: #4A0E35;
}

.side-seljuk {
  background-color: #0D0B0E;
}

.side:hover,
.side:focus-visible {
  color: #B8954A;
}

.side-byzantine:hover,
.side-byzantine:focus-visible {
  background-color: #5C1443;
}

.side-seljuk:hover,
.side-seljuk:focus-visible {
  background-color: #1C181E;
}

.versus {
  display: block;
  width: 1.6em;
  height: 1.6em;
  color: #B8954A;
}

.versus svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.summary {
  max-width: 34rem;
  margin: 2rem auto;
  font-size: clamp(1rem, 3.8vw, 1.125rem);
  line-height: 1.6;
  color: #CFC2A8;
}

.summary strong {
  color: #E8DCC4;
  white-space: nowrap;
}

.summary a {
  color: inherit;
  text-decoration-color: rgba(184, 149, 74, 0.6);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 200ms ease;
}

.summary a:hover,
.summary a:focus-visible,
.summary a:hover strong,
.summary a:focus-visible strong {
  color: #B8954A;
}

.divider {
  width: min(15rem, 70%);
  height: 16px;
  margin: 0 auto 1.75rem;
  border: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='16' viewBox='0 0 240 16'%3E%3Cdefs%3E%3ClinearGradient id='l'%3E%3Cstop offset='0' stop-color='%23B8954A' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23B8954A'/%3E%3C/linearGradient%3E%3ClinearGradient id='r'%3E%3Cstop offset='0' stop-color='%23B8954A'/%3E%3Cstop offset='1' stop-color='%23B8954A' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='0' y='7.5' width='100' height='1' fill='url(%23l)'/%3E%3Crect x='140' y='7.5' width='100' height='1' fill='url(%23r)'/%3E%3Cpath fill='%23B8954A' d='M106 5.5L108.5 8L106 10.5L103.5 8ZM134 5.5L136.5 8L134 10.5L131.5 8ZM120 5L123 8L120 11L117 8Z'/%3E%3Cpath fill='none' stroke='%23B8954A' d='M120 1.5L126.5 8L120 14.5L113.5 8Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.reading-title {
  margin: 0 0 1rem;
  padding-left: 0.25em;
  color: #B8954A;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.reading-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65em;
  padding: 0.75rem 1.5rem;
  border: 1px solid #B8954A;
  color: #E8DCC4;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background-color 200ms ease, color 200ms ease;
}

.button img {
  flex-shrink: 0;
  border-radius: 3px;
  -webkit-user-drag: none;
}

.button:hover,
.button:focus-visible {
  background-color: #B8954A;
  color: #1B1220;
}

:focus-visible {
  outline: 2px solid #E8DCC4;
  outline-offset: 4px;
}

@media (max-width: 480px) {
  .card {
    border-width: 14px;
  }

  .reading-links {
    flex-direction: column;
  }
}

@media (max-width: 389px) {
  .sides {
    grid-template-columns: max-content;
    row-gap: 0.5em;
  }

  .versus {
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    animation: none;
  }

  .button,
  .side,
  .summary a {
    transition: none;
  }
}
