/* Fonts */

@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 300;
  src: url('/assets/fonts/merriweather-v21-latin_cyrillic-300.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 700;
  src: url('/assets/fonts/merriweather-v21-latin_cyrillic-700.woff2') format('woff2');
  font-display: swap;
}

/* Variables */

:root {
  color-scheme: light dark;
  --background-color: var(--white);
  --text-color: var(--near-black);
  --text-color-reduce: var(--dark-gray);
  --link-color: var(--text-color);
  --link-color-hover: var(--yellow);
  --white: #fff;
  --off-white: #ccc;
  --near-black: #111416;
  --yellow: #FFC312;
  --gray: #535c68;
  --dark-gray: #2f3542;
  --coral: #FF424D;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color: var(--near-black);
    --text-color: var(--off-white);
    --text-color-reduce: var(--off-white);
  }
}

/* Reset */

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default padding */
ul[class],
ol[class] {
  padding: 0;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
ul[class],
ol[class],
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  scroll-behavior: smooth;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Remove list styles on ul, ol elements with a class attribute */
ul[class],
ol[class] {
  list-style: none;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations and transitions for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Global */

html {
  font-size: 14px;
}

@media only screen and (min-width: 900px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: 'Merriweather', -apple-system, serif;
  color: var(--text-color);
  background-color: var(--background-color);
}

a {
  color: var(--link-color);
  text-decoration: underline;
}

a:hover {
  color: var(--link-color-hover);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-color);
}

.svg-icon {
  display: inline-block;
  vertical-align: text-bottom;
}

.fixed-aspect-wrapper {
  margin: 1em 0;
  position: relative;
  padding-top: 56.25%;
}

.fixed-aspect-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Layout */

.container {
  max-width: 900px;
  margin: auto;
  padding: 0 1rem;
}

/* Header */

.header {
  margin-top: 1.4rem;
  margin-bottom: 3rem;
}

  @media only screen and (min-width: 900px) {
    .header {
      display: flex;
      flex-direction: row;
      margin-bottom: 4rem;
    }
  }

.header__link {
  display: inline-block;
  font-size: 1.7rem;
  line-height: 1;
  font-weight: bold;
  color: var(--yellow);
  text-decoration: none;
  margin-bottom: 2rem;
}

.header--internal {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.header--internal .header__link {
  margin-left: 1rem;
  margin-bottom: 0;
}

.header__cover img {
  margin-bottom: 0.8rem;
}

.header__text {
  margin-bottom: 2rem;
}

.header__description,
.header__hosts {
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--text-color-reduce);
  margin-bottom: 1rem;
}

.header__rating {
  margin-bottom: 1rem;
}

  @media only screen and (min-width: 900px) {
    .header__rating {
      margin-bottom: 0;
    }

    .header__text {
      width: 80%;
      margin-bottom: 0;
    }    

    .header__description,
    .header__hosts {
      max-width: 630px;
    }
  }

.header__rating a {
  display: inline-block;
  text-decoration: none;
  font-size: 0.7rem;
  line-height: 1.7;
  color: var(--text-color-reduce);
}

.header__rating a:hover {
  color: var(--link-color-hover);
}

.all-episodes {
  margin-bottom: 2rem;
}

/* Footer */

.footer {
  font-size: 0.8rem;
  line-height: 1.7;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

@media only screen and (min-width: 900px) {
  .footer {
    display: flex;
    justify-content: space-between;
  }
}

/* Subscription */

.subscribe {
  margin-bottom: 5rem;
}

.subscribe__title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.subscribe__list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.subscribe__list li {
  width: 135px;
  font-size: 1rem;
  list-style: none;
  margin-right: 2rem;
  margin-bottom: 0.8rem;
}

.subscribe__patreon {
  margin-top: 1rem;
  line-height: 1.5;
}

.subscribe__patreon-icon {
  position: relative;
  top: -3px;
  margin-right: 4px;
}

.subscribe__patreon-link {
  text-decoration-color: var(--coral);
}

.subscribe__patreon-link:hover {
  color: var(--coral);
}

/* Podcast List */

.episode-list__title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 2rem;
}

.feature {
  margin-bottom: 4rem;
}

.feature__cover {
  max-width: 300px;
  margin-bottom: 1rem;
}

.feature__cover img {
  width: 100%;
}

.feature__title {
  font-size: 1.3rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.feature__description {
  flex: 1;
  line-height: 1.5;
  overflow-wrap: break-word;
  max-width: 600px;
}

@media only screen and (min-width: 900px) {
  .feature {
    display: flex;
    flex-direction: row;
  }

  .feature__cover {
    width: 150px;
    margin-bottom: 0;
  }

  .feature__description {
    margin-left: 1.5rem;
    max-width: 100%;
  }
}

/* Episode */

.episode__title {
  font-size: 1.6rem;
  line-height: 1.4;
  margin-bottom: 0.2rem;
  max-width: 800px;
}

.episode__date {
  display: inline-block;
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
  color: var(--gray);
}

.episode__audio {
  display: block;
  width: 100%;
  margin-bottom: 0.4rem;
  border-radius: 100px;
}

.episode__download {
  display: inline-block;
  font-size: 0.85rem;
}

.episode__cover {
  margin-bottom: 1rem;
}

@media only screen and (min-width: 900px) {
  .episode__cover {
    float: right;
    margin-left: 2rem;
  }
}

.episode__content {
  font-size: 1.1rem;
  margin-top: 3rem;
  margin-bottom: 4rem;
}

/* Content */

.content {
  overflow-wrap: break-word;
}

.content p {
  margin-bottom: 1em;
  line-height: 1.6;
}

.content ul {
  margin: 0;
  padding: 0;
  margin-bottom: 2rem;
}

.content li {
  margin: 0;
  padding: 0;
  list-style: none;
  margin-bottom: 0.5rem;
  padding-left: 1.6em;
  position: relative;
}

.content li:before {
  content: '—';
  position: absolute;
  top: 0;
  left: 0;
}
